java using scanner to print something on the console code example Example: java how to write something on the console with scanner Scanner scanner = new Scanner(System.in);