Difference between abtsract & final

Answer Posted / naveen

abstract and final are java modifiers. abstract is applied
to only class and methods.If class is abstract we cannot
instantiated of the class.If method is abstract it cannot
have body.abstract class contains concreate methods and
abstract methods.

final is a java modifier . It can be applied to class ,
variables, methods.If class is final we cannot inherited the
class. If variable is final we cannot change the value of
the variable. If method is final we cannot override that method.

Is This Answer Correct ?    14 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is void keyword?

664


Why string is called as immutable?

522


What is final, finally, finalize?

594


Which collection is best for sorting in java?

692


What is re-factoring in software?

574






Is hashmap thread safe?

554


What are the pillars of java?

487


What is string syntax?

546


What is the properties class?

557


How to make a non daemon thread as daemon?

545


Convert a BST into a DLL and DLL to BST in place.

666


How objects of a class are created if no constructor is defined in the class?

578


What is a ?

747


What is jit compiler in java?

583


Add a value x to array from index l to r where 0 <= l <= r <= n-1

624