본문 바로가기
프로그래밍/Kotlin

숫자 형식맞춰 출력하기 (#,###) - DecimalFormat

by Youngs_ 2021. 8. 19.
import java.text.DecimalFormat

fun main(args:Array<String>){
    val WonFormat = DecimalFormat("#,###원")
    var Won = 10000

    println(Won)
    println(WonFormat.format(Won))

}

 

댓글