Can we overload the main() method?


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More Core Java Interview Questions

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.

6 Answers  


what is servlet enginee?

0 Answers   Covansys,


Why do we need data structure in java?

0 Answers  


What do you understand by java?

0 Answers  


What is default switch case? Give example.

0 Answers  


Difference between String & StringBuffer

16 Answers   IBM, Infosys, Tech Mahindra, Wipro,


Why do we create threads in java?

0 Answers  


why doesn't java run on all platforms?

0 Answers  


How do you use find and replace?

0 Answers  


Is multiple inheritance allowed in Java? Why ?

7 Answers  


What is the largest long allowed by java?

0 Answers  


What is the difference between && and & in java?

0 Answers  


Categories