Core Java Interview questions

Total available count: 646
Subject - Java Technologies
Subsubject - Core Java

Why main method is static in java?

Because object is not required to call static method if It were non-static method, jvm creates object first then call main() method that will lead to the problem of extra memory allocation.


Next 5 interview question(s)


What do you know about static method in java?


What is the difference between Abstraction and Encapsulation in java?


What is  immutable class and give an example?


Can we use final for constructor?


 Which keyword helps to prevent overriden and inherit in java?