10000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5f4db60 commit 0efb6e4Copy full SHA for 0efb6e4
tutorials/tour/basics.md
@@ -252,20 +252,10 @@ We will cover traits in depth [later](traits.md).
252
253
## Main Method
254
255
-Using singleton objects, you can define main methods like below.
+Using objects, you can define main methods like below.
256
257
```
258
object Main {
259
- def main(args: Array[String]): Unit = {
260
- println("Hello, world!")
261
- }
262
-}
263
-```
264
-
265
-Because every runnable application has a main method, Scala also provides a more convenient way of defining your main method by extending `App` trait.
266
267
268
-object Main extends App {
269
+ def main(args: Array[String]): Unit = println("Hello, Scala developer!")
270
}
271
0 commit comments