16 May 2013

Scala notes: part 2: How to print something on screen(console) in Scala

In Scala ,to print out the result with Console.println(…)

Example:
Console.println( "Print this string" )

but you can write :
println("Print this string")


Note to myself: As i keep using accidentaly Java's way to display stuff on screen,so i add this entry to remind myself ;)

No comments:

Post a Comment