Skip to content

Instantly share code, notes, and snippets.

Avatar
🌴
On vacation

Uğur Erol Concers

🌴
On vacation
View GitHub Profile
View NumberExam
val Byte:Byte = 2
val short:Short = 3566
val int:Int = 655_546
val long:Long = 8449_6664_6115_9987
val long3:Long = 8449L
val Byte2 = 2 // Int
val short2 = 3566 // Int
val int2 = 655_546 //Int
val long2 = 8449L // Long
View number.kt
Byte | 8 bit | -128 (-2^7) | 127 (2^7 - 1)
Short | 16 bit | -32768 (-2^15) | 32767 (2^15 - 1)
Int | 32 bit | -2,147,483,648 (-2^31) | 2,147,483,647 (2^31 - 1)
Long | 64 bit | -9,223,372,036,854,775,808 (-2^63) | 9,223,372,036,854,775,807 (2^63 - 1)
View activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="300dp"