書名: Hands-On Design Patterns with Kotlin作者名: Alexey Soshin本章字數: 71字更新時間: 2021-06-25 20:49:22
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.
推薦閱讀
- 數字媒體應用教程
- Python for Secret Agents:Volume II
- R語言編程指南
- Visual C++串口通信技術詳解(第2版)
- C語言從入門到精通(第4版)
- Elasticsearch Server(Third Edition)
- Android程序設計基礎
- Multithreading in C# 5.0 Cookbook
- iOS自動化測試實戰:基于Appium、Python與Pytest
- Couchbase Essentials
- 平面設計經典案例教程:CorelDRAW X6
- Moodle 3 Administration(Third Edition)
- Learning Concurrency in Python
- Getting Started with Web Components
- VMware vSphere 5.5 Cookbook