+ 1

Can anyone help me with how i take the input from user in Java?

As a beginner in java, i know how to print any text by System.out.println.. can anyone help me with how i take the input from user?

9th Jul 2019, 2:59 AM
Rupendra Pratap Singh Tomar
Rupendra Pratap Singh Tomar - avatar
4 odpowiedzi
+ 2
Rupendra Pratap Singh Tomar if you had just continued with the tutorial eventually you would have been thaught that. Patience is the key
9th Jul 2019, 3:42 AM
Mind To Machine 💻🕆
Mind To Machine 💻🕆 - avatar
+ 3
Firstly, you import the Scanner with import java.util.Scanner  Secondly, you create an input object for the Scanner  Scanner input = new Scanner();    Thirdly, you ask for the input with which every data type. I will use int as an example.  System.out.println("How old are you?");  input number = input.nextInt();
9th Jul 2019, 3:13 AM
Franky BrainBox
Franky BrainBox - avatar
+ 3
Using Scanner.
9th Jul 2019, 6:29 AM
Sonic
Sonic - avatar