Text Output

Text can be printed on the screen using print() or println(). Using println() puts a carriage return on the end of the line.

println( "Hello" );
println( 6 );
println( 7 * 3 );

String drink = "coffee";
print( "I like " );
println( drink );

This code prints:

Hello
6
21
I like coffee