+ 3
How can i compare types Scanner and String in Java? How do i make a String from Scanner? [SOLVED]
3 Answers
+ 17
Do you mean how to gain input?
Scanner sc=new Scanner(System.in);
String str=sc.nextLine();
Compare types of Scanner:
System.out.println (sc instanceof Scanner);
+ 18
don't forget import statement đ
//import java.util.Scanner;
- 1
hey