0% found this document useful (0 votes)
8 views

15 Tricky Corejava Questions

The document discusses compareTo() methods, stateless and stateful beans, overriding static methods, blank final variables, and late binding.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

15 Tricky Corejava Questions

The document discusses compareTo() methods, stateless and stateful beans, overriding static methods, blank final variables, and late binding.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

How to write compareTo() Method?

What is the difference b/w stateless beans statefull beans and Http Session?
Why java does not allow overriding of static methods?

Overriding depends on having an instance of a class.

A static method is not associated with any instance of a class so the concept is not applicable.

q) When is it appropriate to use blank final variables?

A) The final property of class must have a value assigned before object is created.

So the last point where you can assign value of them is constructor.

This is used often for immutable objects.

What is late binding?

You might also like