October 2018
Intermediate to advanced
370 pages
9h 15m
English
In this category, Kotlin provides two data types:
These data types can store values containing decimal places. Float and Double are the floating point data types that are used to store real number values. A Float can contain 4 bytes of information, while the Double data type can handle 8 bytes. Kotlin allows us to handle scientific notation with the Double data type as follows:
fun main(args: Array<String>) { var d1 : Double = 7.20E15 // Scientific calculation var d2 = 7.20e-15
println("Value of d1 = " + d1 ...
Read now
Unlock full access