+ 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 RĂ©ponses
+ 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
đčđ“‡đ’¶đ“ƒđ“€đ“Ž đ”đ“‡đ’¶đ’Ÿđ“ƒđ”đ‘œđ“
đčđ“‡đ’¶đ“ƒđ“€đ“Ž đ”đ“‡đ’¶đ’Ÿđ“ƒđ”đ‘œđ“ - avatar
+ 3
Using Scanner.
9th Jul 2019, 6:29 AM
Sonic
Sonic - avatar