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 ellipsis in java?
What are different access specifiers in java?
What is a parameter in a function?
What is thread life cycle in java?
What modifiers are allowed for methods in an interface?
What is the difference between I ++ and ++ I in java?
What is difference between ++ I and I ++ in java?
What is a predicate method?
Java is Pass by Value or Pass by Reference?
What is prefix of a string?
What are new features introduced with java 8 ?
What is a copy constructor in java?
What is string syntax?
Can a string be null?
What is a functional interface?