0

How to take input from user in java?

2nd Sep 2016, 12:05 PM
Syed M.Danish
2 Answers
0
you can use this code snipet to get user input in java. import import java.util.Scanner; Scanner input = new Scanner(System.in); int decimalnumber = input.nextInt(); hope this help?
2nd Sep 2016, 1:49 PM
Lawal Abdulateef olawale
Lawal Abdulateef olawale - avatar
0
You can do it in may ways but the widely used is by using Scanner class also can import classes like BufferedReader and InputStreamReader classes DataInputStream class Console class import java.util.Scanner; Scanner sc=new Scanner(System.in); int rollno=sc.nextInt(); String name=sc.next(); String name=sc.next();
2nd Sep 2016, 2:44 PM
Sumanth Aralapura
Sumanth Aralapura - avatar