Check out example codes for "how take inputs in java with message". It will help you in understanding the concepts better.

Code Example 1

Scanner sc = new Scanner(;  // Create a Scanner object
String userName = sc.nextLine();//read input string
int age = sc.nextInt(); //read input integer
long mobileNo = sc.nextLong(); //read input long
double cgpa = sc.nextDouble(); //read input double

Code Example 2

InputUSer Scanner

Learn ReactJs, React Native from