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

How to store image in arraylist in java?

697


how to convert Java project into Maven ?

788


Is empty list java?

704


What are the two ways in which thread can be created?

797


Can anonymous class have constructor?

753


Explain the purpose of garbage collection in Java?

766


What is difference between adapter class and listener?

682


Is {a, n, d} a palindrome? If you are given a random string, is it a palindrome or not?

797


What is the purpose of the wait(), notify(), and notifyall() methods in java programming?

764


Why java is made?

749


Difference between current previous versions of Java?

775


What does it mean to be immutable?

743


What are 3 boolean operators?

722


What is the difference between inner class and nested class?

747


What happens if constructor is private?

770