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

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. 

主站蜘蛛池模板: 乐业县| 沅江市| 波密县| 仁布县| 雷山县| 黄浦区| 阜平县| 都匀市| 怀集县| 灵宝市| 曲周县| 珠海市| 扎鲁特旗| 南阳市| 洛川县| 绩溪县| 新余市| 新泰市| 保靖县| 美姑县| 宜川县| 临夏县| 关岭| 钦州市| 旌德县| 临漳县| 阳西县| 正阳县| 泾源县| 桂平市| 抚顺县| 色达县| 林周县| 法库县| 嘉义县| 高阳县| 五河县| 金溪县| 柳江县| 土默特左旗| 崇阳县|