Skip to content

Commit 408ff50

Browse files
committed
Chapter 1
Bu bölümde Kotlin'de kullanılan temel türleri açıklıyoruz: sayılar, karakterler, booleans, arrayler ve diziler
1 parent 710b7e9 commit 408ff50

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

BasicTypes/.idea/gradle.xml

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

+24-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class MainActivity : AppCompatActivity() {
3737

3838
//---------------------------Underscores in numeric literals (since 1.1)-----------------------
3939

40-
println("-----Underscores in numeric literals-----")
40+
println("-----Alt çizgi kullanımı-----")
4141
val sixMillion = 1_000_000
4242
val creatingCartNumber=123_456_678_123L
4343
val socialSecurityNumber=234_000_000L
@@ -49,6 +49,29 @@ class MainActivity : AppCompatActivity() {
4949
println("hexBytes = $hexBytes")
5050
println("bytes = $bytes")
5151

52+
val a : Int =100
53+
val boxedA : Int? =a
54+
val anotherBoxedA : Int? = a
55+
56+
val b :Int = 128
57+
val boxedB :Int? =b
58+
val anotherBoxedB : Int? = b
59+
println(boxedA === anotherBoxedA) // true
60+
println(boxedB === anotherBoxedB) //false
61+
62+
63+
val c :Int =10000
64+
println(c==c)// true
65+
val boxedC: Int? =c
66+
val anotherBoxedC : Int? = c
67+
println(boxedC == anotherBoxedC) //true
68+
69+
70+
71+
72+
73+
74+
5275

5376

5477

0 commit comments

Comments
 (0)