September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
12
Task/Variable-size-Get/Kotlin/variable-size-get.kotlin
Normal file
12
Task/Variable-size-Get/Kotlin/variable-size-get.kotlin
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
// version 1.1.2
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
/* sizes for variables of the primitive types (except Boolean which is JVM dependent) */
|
||||
println("A Byte variable occupies: ${java.lang.Byte.SIZE / 8} byte")
|
||||
println("A Short variable occupies: ${java.lang.Short.SIZE / 8} bytes")
|
||||
println("An Int variable occupies: ${java.lang.Integer.SIZE / 8} bytes")
|
||||
println("A Long variable occupies: ${java.lang.Long.SIZE / 8} bytes")
|
||||
println("A Float variable occupies: ${java.lang.Float.SIZE / 8} bytes")
|
||||
println("A Double variable occupies: ${java.lang.Double.SIZE / 8} bytes")
|
||||
println("A Char variable occupies: ${java.lang.Character.SIZE / 8} bytes")
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue