Skip to content

Commit

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

fun main() {
var i = 10
var l = 20L

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

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

var name2 = "10"
i = name2.toInt()
var name = "hello"
print(name.uppercase())
print(name.lowercase())
print(name[0])

name = "채연"
print("제 이름은 ${name}입니다.")
print("제 이름은 ${name + 10}입니다.")
}

0 comments on commit 1c54118

Please sign in to comment.