Skip to content

Commit

Permalink
[ADD/#1] 코틀린 형변환 실습
Browse files Browse the repository at this point in the history
  • Loading branch information
b1urrrr committed Nov 15, 2023
1 parent e8e2132 commit 0f7379b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions WEEK01/app/src/main/java/com/ocomwan/kotlinbasics/Main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@ const val num = 20

fun main() {
var i = 10
var name = "채연"
var point = 3.3
var l = 20L

i = 20
l = i.toLong()
i = l.toInt()

var name = ""
name = i.toString()

var name2 = "10"
i = name2.toInt()
}

0 comments on commit 0f7379b

Please sign in to comment.