print() and println()
Sometimes it's helpful to see exactly what the value is of a variable at a particular time. Use the print() and println() functions print out messages in the console at the bottom of the Processing application window. This console is not displayed when you export a Processing sketch to an Application or to the Web, it's just helpful while developing.
// notice the difference between print and println
// println is short for Print Line
print ("hello");
print ("world");
println("hello");
println("world");
Using println() with different kinds of variables
Use println() to see how different variable types behave.
int a=10;
int b=15;
println(a);
println(b);
println("a"); // this just prints out "a", not the variable
float c = -17.34;
println(c);
String s="good morning";
println (s);