Kotlin มีประเภทตัวเลข ตรรกะ และข้อความตามปกติ บน JVM ตัวเลขจะแมปกับ Java ดั้งเดิมเมื่อเป็นไปได้ (Int → int) เพื่อหลีกเลี่ยงค่าใช้จ่ายในการชกมวย ต่างจาก Java คุณไม่ได้ใช้ชื่อประเภทดั้งเดิมที่เป็นตัวพิมพ์เล็กในซอร์สโค้ด — คุณเขียน Int, Double, Boolean ทุกที่

ตัวเลขและบูลีน
Full content is available with a subscription.
Get full access to all courses on the platform for one year with a single payment.
Unlike other platforms that charge per course, here you get everything for one price, and after one year of use there will be no automatic charge for the following year.