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
What are peerless components?
How is string stored in java?
What is the purpose of object oriented programming?
Can we write method inside a method in java?
What are the different types of inheritance in java?
Explain the difference between static and dynamic binding in java?
What is the use of bufferedreader?
What does the @override annotation do?
What are the two ways in which thread can be created?
Can we have try block without catch block?
What is the difference between multitasking and multithreading in Java
How many static init can you have?
What is a blocking method in Java?
Give me some null interfaces in java?
What is the += operator called?