How to use scanner in java?
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 |
Need to use public,static keywords in main function?
When should we create our own custom exception classes?
Why we need Finally with try? pls expain with ur example..
What is meant by string is immutable?
Explain restrictions for using anonymous inner classes?
What are class types in java?
did interface can implementation method ? i know its not possible but my interviewer said its possible ..but how..? any one have idea ???
Why there are some null interface in java? What does it mean?
Explain OOPs concept.
What is autoboxing and unboxing?
Is it possible to write a regular expression to check if string is a number?
Is a boolean 1 bit?