官术网_书友最值得收藏!

No semicolons

In Java, every line of code must be terminated with a semicolon:

System.out.println("Hello"); //<- This is a semicolon
System.out.println("World"); //<- I still see you, semicolon

But Kotlin is a pragmatic language. So, instead, it infers during compilation where it should put the semicolons:

println("Hello") //<- No semicolon here
println("World") //<- Not here

Most of the time, you won't need to put semicolons in your code. They're considered optional. 

主站蜘蛛池模板: 资阳市| 会宁县| 扶风县| 军事| 江都市| 治县。| 泸水县| 太谷县| 隆林| 涟水县| 岳池县| 北碚区| 松江区| 孟村| 长葛市| 和平区| 安国市| 手游| 兴山县| 井陉县| 临朐县| 卫辉市| 广丰县| 新津县| 泽普县| 临安市| 泽普县| 雷山县| 七台河市| 西和县| 绥棱县| 马鞍山市| 宁津县| 鄱阳县| 宜丰县| 建湖县| 唐河县| 来凤县| 鱼台县| 九寨沟县| 互助|