Kotlin code with different data types?

All QuestionsCategory: KotlinKotlin code with different data types?
chetan shidling asked 4 years ago

I need short information.

1 Answers
chetan shidling answered 4 years ago
fun main(args: Array<String>) {
   val a: Int = 2000
   val d: Double = 300.00
   val f: Float = 500.00f
   val l: Long = 3000000004
   val s: Short = 20
   val b: Byte = 1
   
   println("Your Int Value is "+a);
   println("Your Double  Value is "+d);
   println("Your Float Value is "+f);
   println("Your Long Value is "+l);
   println("Your Short Value is "+s);
   println("Your Byte Value is "+b);
}