What is meant by final class, methods and variables?

Answer Posted / narasimha

when you declare a class as final, that class cannot be
extended.In java "String" class is final.

when you declare the variable as final then we can
intialize it only once.it is constant.

when declare the method as final we cannot override the
method

Is This Answer Correct ?    12 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the exception hierarchy in java?

483


What is the difference between the boolean & operator and the && operator in java programming?

563


What is array initialization in java?

486


Name few java.lang classes introduced with java 8 ?

535


Can we write any code after throw statement?

603






How many types of threads are there in java?

502


What is a nonetype?

563


What is the difference between multitasking and multithreading in Java

718


What is the final access modifier in java?

612


What is complexity in java?

521


What is floor math?

511


What class allows you to read objects directly from a stream in java programming?

508


What does super keyword do?

556


What is method overloading in JAVA? Why is it not present in C ?

586


Can we instantiate interface in java?

670