What happens when the main() isn't declared as static?
Answer / nashiinformaticssolutions
When the main method is not declared as static, then the program may be compiled correctly but ends up with a severe ambiguity and throws a run time error that reads
| Is This Answer Correct ? | 0 Yes | 0 No |
Explain what pure virtual function is?
Explain about interrupt() method of thread class ?
What are the common uses of "this" keyword in java ?
What is generics in java interview questions?
ublic class Java_Coding_Samples { public static void JavaHungr(NumberFormatException ae){ System.out.println("integer"); } public static void JavaHungry(Exception e){ System.out.println("string"); } public static void JavaHungry(ArithmeticException ae){ System.out.println("object"); } public static void main(String[] args) { JavaHungry(null); }
Does java list allow null?
Can you override private or static method in java?
What is the scope or life time of instance variables?
Can we make the abstract methods static in java?
Explain working of call by reference function invoking.
Which is the best approach for creating thread ?
What is a class variable?