Kotlin - Data Types
You want to represent the decimal number 255 in Kotlin using a binary literal with underscores for readability. Which of the following is the best way to write it?
0b1111_1111 correctly uses underscores and matches 255. 0b11111111 is correct but less readable. 0b1111_1110 is 254, and 0b1111_11112 has invalid digit '2'.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions