System.out.print(val)
=> To print in console without new lineSystem.out.println(val)
=> To print in console with new lineSystem.GC()
=> Garbage CollectorScanner var = new Scanner(System.in)
=> Declaring a Scanner class, Buffer size of 1 KBvar.close()
=> Closing the Scanner after usevar1 = var.nextInt()
=> Taking integer Inputvar.hasNextInt()
=> Checks if the input is an Integervar1 = var.nextByte()
var1 = var.nextShort()
var1 = var.nextLong()
var1 = var.nextFloat()
var1 = var.nextDouble()
var1 = var.nextBoolean()
String var1 = var.next()
=> Taking string Input of a single wordString var1 = var.nextLine()
=> Taking string Input of an entire line BufferedReader var = new BufferedReader(new InputStreamReader(System.in));
String var = input.readLine();
=> Take String inputConsole var = System.console();
String var = input.readLine();
=> Take String input, Does not keeps a Buffer to store for taking Inputchar[] var = input.readPassword();
=> Takes input as Character array, Does not shows the value typed in console while typing