Skip to content

Commit fe5f757

Browse files
authored
Merge pull request scala#2464 from geminicaprograms/patch-1
nit: redundant call to `sb.toString` before print
2 parents 07b2d1b + 6f28541 commit fe5f757

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

_overviews/scala3-book/methods-main-methods.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ For example, given this `@main` method that takes an `Int`, a `String`, and a va
4949

5050
val sb = StringBuilder(s"Happy $age$suffix birthday, $name")
5151
for other <- others do sb.append(" and ").append(other)
52-
sb.toString
53-
println(sb)
52+
println(sb.toString)
5453
```
5554

5655
When you compile that code, it creates a main program named `happyBirthday` that’s called like this:

0 commit comments

Comments
 (0)