+ 7

How can I get user input and perform operations on it?

Java

26th Jan 2018, 4:46 AM
Saswata Biswas
Saswata Biswas - avatar
4 Respuestas
+ 20
operations may vary depending on datatype & what operations u want to perform , here is how to take user input ☺👍 https://www.sololearn.com/learn/Java/2220/?ref=app
26th Jan 2018, 5:02 AM
Gaurav Agrawal
Gaurav Agrawal - avatar
+ 15
Use Scanner class For getting Integer form user use this method from Scanner Class Suppose we have created a scanner object and give that name is obj int a = obj.nextInt(); For float float a =obj.nextFloat(); for String String a =obj.nextLine();
16th May 2019, 3:53 PM
Sumit Programmer😎😎
Sumit Programmer😎😎 - avatar
+ 3
you can use "Scanner" or "BufferedReader "or simply you can do public static void main (int n) { //some coding. }
26th Jan 2018, 5:03 AM
🦋FEATHER🦋
🦋FEATHER🦋 - avatar
0
hello
19th Oct 2018, 7:03 PM
Yusefabdallrhmun