Answer Posted / hrindows@gmail.com
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 |
Post New Answer View All Answers
Why Java doesn’t support multiple inheritance?
What is primitive array?
Can a final variable be null?
What does percent mean in java?
How does compareto method work?
What is skeleton and stub? What is the purpose of those?
Define max and min heap, also the search time of heap.
What Is Query Throttling in java?
how can i use a nonsynchronized hashtable?
What is the core java?
Explain about the performance aspects of core java?
Can we write a class without main method in java?
Why singleton pattern is better than creating singleton class with static instance?
What is a java applet? What is an interface?
What is maximum size of arraylist in java?