9951 explained code solutions for 126 technologies


javaMethod to get user input


public String getUserInput()
{
  Scanner s = new Scanner(System.in);
  String input = s.nextLine();
  return input;
}ctrl + c
Scanner s = new Scanner(System.in)

Instance to read user input

String input = s.nextLine()

Blocking code which waits for a user input