when we have to use final class in java?

Answer Posted / rana

A class is said to be final when i dnt want my class to be
extended by any class so that methods implementation cannot
be changed.
For ex String is a final class

Is This Answer Correct ?    31 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain some best practices you would apply while using collection in java?

572


Is arraylist an object in java?

605


In the below example, how many string objects are created?

561


Explain reverse a linked list iterative solution in java?

504


What is a byte array?

593






Why is it called boolean?

527


How can u increase the heap size in the memory?

556


How to retrieve data from database in java using arraylist?

532


What is singleton class in java and how can we make a class singleton?

578


How to do encapsulation in java?

574


Why declare Main() method as a static in java ?

600


What is contractor means and methods?

561


What is derived datatype?

631


What are the different collection views provided by maps?

573


What is the difference between math floor and math round?

505