How to use scanner | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson

How to use scanner

10th Jun 2023, 1:47 PM
parajuli kamal
parajuli kamal - avatar
4 Answers
+ 4
Complete sololearn java course literally it is one of the first lessons So you’ll know fastly
10th Jun 2023, 2:07 PM
Ugulberto Sánchez
Ugulberto Sánchez - avatar
10th Jun 2023, 2:12 PM
Tibor Santa
Tibor Santa - avatar
Scanner sc=new Scanner(; int a=sc.nextInt(); double b=sc.nextDouble(); String; System.out.println("integer umber is "+a); System.out.println(b+c);
11th Jun 2023, 9:19 PM
Antonio Soto
Antonio Soto - avatar
//import the Scanner class from java.util package import java.util.Scanner; public class Main { public static void main(String [] args) { // instantiate the Scanner class Scanner sc = new Scanner(; System.out.println("Enter your name:"); String name = sc.nextLine(); } } run this code and you'll figure out...also finish some tutorials you will know the basics
12th Jun 2023, 8:28 AM
Ayan Pradhan
Ayan Pradhan - avatar