Java


The Java support is as in a standard console application.

Reading

Scanner, and BufferedReader work. Prefer BufferedReader, since Scanner is slower

  • Examples
Scanner in = new Scanner(System.in);
int n = in.nextInt();
String line = in.nextLine();

BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

int size = Integer.parseInt(reader.nextLine());

Printing

Print using System.out.print* methods

  • Examples
System.out.println("This is a message");
System.out.printf("%s is %d-years-old", "John", 19);