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

Differentiate between stringbuffer and string?

589


Explain the difference between abstract class and interface in java?

528


Explain how can you debug the Java code?

584


What is boolean keyword in java?

590


How does map works in java?

507






What is static block?

580


What is the null?

533


What is the difference between abstract classes and interfaces?

503


How many types of operators are there?

514


What is command line argument in java?

599


What is deserialization?

581


What is the purpose of the finalize() method?

700


What is hashing principle in java?

546


Discuss about garbage collector in Java.

636


What are the six ways to use this keyword?

602