Skip to content

Commit 710b7e9

Browse files
committedFeb 11, 2021
Kotlin
1 parent 0268b09 commit 710b7e9

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed
 

‎BasicTypes/app/src/main/java/com/merttan/basictypes/MainActivity.kt

+17-1
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,26 @@ class MainActivity : AppCompatActivity() {
3131
val d=1.1
3232
val f=1.1f
3333

34-
printDouble(d)
34+
println(printDouble(d))
3535
// printDouble(i) //Error : Type missmatch
3636
// printDouble(f) //Error : Type missmatch
3737

38+
//---------------------------Underscores in numeric literals (since 1.1)-----------------------
39+
40+
println("-----Underscores in numeric literals-----")
41+
val sixMillion = 1_000_000
42+
val creatingCartNumber=123_456_678_123L
43+
val socialSecurityNumber=234_000_000L
44+
val hexBytes = 0xFF_EC_DE_5E
45+
val bytes=0b11010010_01101001_10010100_10010010
46+
println("sixMillion = $sixMillion")
47+
println("creatingCartNumber = $creatingCartNumber")
48+
println("socialSecurityNumber = $socialSecurityNumber")
49+
println("hexBytes = $hexBytes")
50+
println("bytes = $bytes")
51+
52+
53+
3854

3955

4056

0 commit comments

Comments
 (0)