Can we overload the main() method?
11. static class A { 12. void process() throws Exception { throw new Exception(); } 13. } 14. static class B extends A { 15. void process() { System.out.println(”B”); } 16. } 17. public static void main(String[] args) { 18. new B().process(); 19. } What is the result? 1 B 2 The code runs with no output. 3 Compilation fails because of an error in line 12. 4 Compilation fails because of an error in line 15.
what is servlet enginee?
Why do we need data structure in java?
What do you understand by java?
What is default switch case? Give example.
Difference between String & StringBuffer
16 Answers IBM, Infosys, Tech Mahindra, Wipro,
Why do we create threads in java?
why doesn't java run on all platforms?
How do you use find and replace?
Is multiple inheritance allowed in Java? Why ?
What is the largest long allowed by java?
What is the difference between && and & in java?