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 is scope & storage allocation of static, local and register variables? Explain with an example.
Can java list contain duplicates?
What is meant by inheritance and what are its advantages?
What are the core java topics?
Is class is a data type?
Define interface in java?
What two classes are used to read data only?
What is use of functional interface in java 8? Explain
Can we override private methods?
What is executor memory?
What is the size of an array?
Enlist diffrent types of inheritance supported by java?
Write a java program for binary search?
What is the difference between JDK and JVM?
Where is singleton pattern used?