If we want to take input from user in JAva language then we have two option .
1. import Scanner Class.  2. Bufferreader 

Step1. 1st of all we import scanner class.

import java.util.Scanner;

Steps 2. After that we create object of Scanner Class.

Scanner objsc=new Scanner(System.in);

Step 3.  After creating object we are eligible for taking input from user.

int a=objsc.nextInt();
float b=objsc.nextFloat();
String name=objsc.next();