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 java util concurrentmodificationexception?
What is the requirement of thread in java?
What is java thread dump, how can we get java thread dump of a program?
What is constructor and virtual function? Can we call a virtual function in a constructor?
What is a final class in java?
Is null function in java?
Can java run on google chrome?
What is console based application in java?
Difference between Primary key and unique key?
What are the loops in java?
What is the superclass of exception?
What is files manifesting?