How to use scanner in java?
import java.util.Scanner;
class classname{
public methodname(){
//Scanner declaration
Scanner s_name = new Scanner(System.in);
//Use Scanner to take input
int val = s_name.nextInt();
}
}
| Is This Answer Correct ? | 0 Yes | 0 No |
What is close method? How it's different from Finalize & Dispose?
0 Answers InfoAxon Technologies,
What methods are used in Servlet?Applet communication?
Which sorting algorithm is in place?
what modifiers are used with top-level class?
Is java ee a framework?
How java is platform independent?
41 Answers College School Exams Tests, Infosys, TCS,
What is the difference between char and char *?
What does this mean java?
What is final?
What is the difference between stream and buffer?
There are 100 keys and values in HashMap.how to get the keys and values?
What is the difference between interpreter and compiling ?