Turtle Commands | Console Commands

Basic Console Commands

      Output


print (item to print)
      Prints the given item to the console panel. The input can be a char,
      int, long, float, double, boolean, string, or object.


println (item to print)
      Prints the given item to the console panel, but also enters a return
      and moves to the beginning of the next line. The input can be a char,
      int, long, float, double, boolean, string, or object.

      Input

boolean
readBoolean()
      Reads the next boolean (true/false) from the console.

char
readChar()
      Reads a character from the console
double
readDouble()
      Reads the next double from the console (without validating its
      format).
float
readFloat()
      Reads the next float from the console (without validating its
      format).
int
readInt()
      Reads the next integer from the console (without validating its
      format).
java.lang.String
readLine()
      Reads a line of text from the console
long
readLong()
      Reads the next long from the console (without validating its
      format).
java.lang.String
readWord()
      Skips whitespace and reads the next word (a string of consecutive
      non-whitespace characters up to but excluding the next space,
      newline, etc.)