File tree 1 file changed +17
-1
lines changed
BasicTypes/app/src/main/java/com/merttan/basictypes
1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -31,10 +31,26 @@ class MainActivity : AppCompatActivity() {
31
31
val d= 1.1
32
32
val f= 1.1f
33
33
34
- printDouble(d)
34
+ println ( printDouble(d) )
35
35
// printDouble(i) //Error : Type missmatch
36
36
// printDouble(f) //Error : Type missmatch
37
37
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
+
38
54
39
55
40
56
You can’t perform that action at this time.
0 commit comments