Skip to content

Instantly share code, notes, and snippets.

@shigemk2
Created January 17, 2015 05:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shigemk2/9fd38843a05e59789753 to your computer and use it in GitHub Desktop.
Save shigemk2/9fd38843a05e59789753 to your computer and use it in GitHub Desktop.
val hundred = "100"
println(hundred, hundred.getClass)
println(hundred.toInt, hundred.toInt.getClass)
println(hundred.toDouble, hundred.toDouble.getClass)
println(hundred.toFloat, hundred.toFloat.getClass)
val one = "1"
println(one, one.getClass)
println(one.toInt, one.toLong.getClass)
println(one.toShort, one.toShort.getClass)
println(one.toByte, one.toByte.getClass)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment