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 the difference between future and callable interface in java?
What are use cases?
How do you check whether the list is empty or not in java?
What is the difference between procedural and object-oriented programs?
What is foreach loop in java?
What’s the difference between constructors and other methods?
What is the java project architecture?
Can we have try block without catch block?
What does it mean to be immutable?
What is the purpose of the system class in java programming?
How do you declare an array in java?
How do you identify if jvm is 32-bit or 64-bit from java program?
What is difference between ++ I and I ++ in java?
Does java runtime require a license?
What are java packages? What is the significance of packages?