Scanner sc=new Scanner(System.in); As,Scanner class-It belong to java.util package where it is used for user input. sc=new Scanner(System.in)-It is an object creation statement.As,it is used to create an new object in the scanner class where the variable named is sc. (System.in)-As, it an standard input stream,means keyborad when the program is executing. Hope it will be helpful for you.