How can final class be used?

Answer Posted / pranab dutta

A final class may not be subclassed so a final class can't
be extended. It means a final method can't be overridden
when its class is inherited. A final variable is a constant
which you can't change value of a final variable.

Is This Answer Correct ?    13 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is array size fixed in java?

524


Where import statement is used in a java program?

600


What is the difference between exception and error in java?

483


I want my class to be developed in such a way that no other class (even derived class) can create its objects. Define how can I do so?

684


What is the difference between heap and stack memory?

535






Can we able to pass objects as an arguments in java?

520


What is replaceall in java?

537


What is meant by class loader? How many types are there?

663


Explain the difference between collection api and stream api in java8?

493


Can we change the value of static variable?

481


When do we use hashset over treeset?

519


What are daemon Threads in java?

598


In java, how we can disallow serialization of variables?

540


Can a class extend more than one class?

595


what is session in java?

729