1. Why Java is considered dynamic?
Answer: It is designed to adapt to an evolving environment. Java programs can carry extensive amount of run-time information that can be used to verify and resolve accesses to objects on run-time.
2. Can we override Static method in Java? Compilation error?
Answer: (No, it can only be hidden, no compilation error
3. When parseInt method can be used?
Answer: This method is used to get the primitive data type of a certain String.
4. When super keyword is used?
Answer: If the method overrides one of its superclass’s methods, overridden method can be invoked through the use of the keyword super. It can be also used to refer to a hidden field.
5. What is Garbage collection?
Answer: It uses garbage collection to free the memory. By cleaning those objects that is no longer reference by any of the program.
6. What is the purpose of default constructor?
Answer: The java compiler creates a default Constructor only if there is no constructor in the class.
7. Can a constructor made be final?
Answer: No
8. Can we overload Java main method?
Answer: Yes, We can overload.
9. Can we override Java main method?
Answer: No
The post Java Interview Questions appeared first on traininginmarathahalli.in.
This post first appeared on Top-most-popular-job-oriented-software-courses, please read the originial post: here