What is the difference between abstract class & Final class

Showing Answers 1 - 19 of 19 Answers

hibapi

  • Oct 2nd, 2006
 

An abstact clas is a class which must be sub-classed and a final class is a class which cant be sub-classed. That means to get the functinaity of an abstract class we must sub class it and use the sub-class but on the other hand a final class must be used as it is without any alteration.......Hope this satisfies all...

Varsha

  • Oct 30th, 2006
 

Hi,

 Abstract must be overridden when used in future by the subclass, whereas Final Class CANNOT be overridden.

faizy

  • Nov 4th, 2006
 

An abstract class, in contrast, provides more structure. It usually defines some default implementations and provides some tools useful for a full implementation. The catch is, code using it must use your class as the base. That may be highly inconvenient if the other programmers wanting to use your package have already developed their own class hierarchy independently. In Java, a class can inherit from only one base class

Rajasekar

  • Nov 7th, 2006
 

Abstract class -> it is not must to override all methods in abstract class. Abstract class may contain abstract methods and non abstract methods.. in this case abstract methods should be overriden and non abstract methods are need not to be overriden

Abstract class can be inherited

Final class -> overriden is not possible, this class cannot be inherited..

  Was this answer useful?  Yes

avitra

  • Nov 23rd, 2006
 

abstract class can be extended where as final class cann't be extended

  Was this answer useful?  Yes

sampra

  • Feb 22nd, 2008
 

An abstact clas is a class which must be sub-classed and a final class is a class which cant be sub-classed. That means to get the functinaity of an abstract class we must sub class it and use the sub-class but on the other hand a final class must be used as it is without any alteratio

  Was this answer useful?  Yes

Abstract Class -> In this class we can create 'n' number of methods which can be prefixed by Abstract are abstract methods and which are not prefixed are non-abstract methods. There we can do declaration of the method and partial implementation. We can use all the methods declared in this class in sub classes, or we can skip the methods which we dont want. Abstract Classes doesn't create an object. We can Extend this class

Final Class -> The Methods declared in this class wont change till the end of the program. We can't extend the Final Class.

  Was this answer useful?  Yes

object creation -- objects can't be created for abstract class but for a final class, we can create objects
inheritence -- final class can't be subclassed but abstract class can be subclassed

vinny

  Was this answer useful?  Yes

Abstract class can not create the instance where as Final class can create the instance.

Abstarct class can be subclassed where as Final class can not be sub classed

Abstarct method can be overriden where as final methods can not be overriden

  Was this answer useful?  Yes

RAJTHILAK

  • Jul 15th, 2011
 

An abstract class is one which can't be instantiated, as it contains one or more abstract methods( methods that are only declared, their implementation is left for
subclasses).An abstract class always needs to be extended n order to be used. A Final class is one which can't be extended/inherited.

  Was this answer useful?  Yes

surender.k

  • Jul 15th, 2011
 

1. abstract class is supports multiple inheritances
2.allows to keep abstract methods or concrete methods or mix of both
3.methods and member variable public is the default modifier.
If class is declared as final if you cannot change its value it becomes constant

  Was this answer useful?  Yes

priyanka arya

  • Jul 20th, 2011
 

we can inherit an abstract class but we can not inherit a final class.

  Was this answer useful?  Yes

sampra

  • Mar 13th, 2012
 

Abstract class..is a class has declared as abstract then we cant create instance. this class can have/not have one or more unimplemented method and that method is declared as abstract.

Final class:a class declared as inherite cant be inherite

  Was this answer useful?  Yes

AWADHESH

  • Dec 3rd, 2012
 

An abstract class is a class which must be sub-classed and a final class is a class which cant be sub-classed. That means to get the functionaity of an abstract class we must sub class it and use the sub-class but on the other hand a final class must be used as it is without any alteration.

Hope this satisfies all..

  Was this answer useful?  Yes

Nikhil Srivastava

  • Apr 7th, 2013
 

Abstract class can be extends, while in case of final class we cant do it.

  Was this answer useful?  Yes

shashank verma

  • Jul 5th, 2013
 

abstract class can be extend but final class can not be extend...

  Was this answer useful?  Yes

riya kajal

  • Aug 30th, 2013
 

we can inherit an abstract class ,and in final class we can not inherit a final class.

  Was this answer useful?  Yes

naveen

  • Nov 25th, 2013
 

Abstract class contains Abstract methods and normal methods. Where Abstract methods do not have any body. The implementation of abstract methods will be in their sub class.

Final class is a class where we cannot create any subclass to the final class.

  Was this answer useful?  Yes

If any class is declared as final class then other classes cannot able to interact with the final class i.e it is not possible to use the variables as well as methods of final class.

But if we declare any class as abstract class then any class can use methods and variables of abstract class methods by extending abstract class.

  Was this answer useful?  Yes

Ankit

  • Sep 1st, 2015
 

To varsha
Class cant be overridden
Your saying is correct but to term as overridden property with a class is wrong

  Was this answer useful?  Yes

friend

  • Sep 7th, 2015
 

Abstract is a class that have abstract method as well as concrete methods. An abstract class can also only have concrete methods. An abstract class can be inherited by one class only. Final class is a class that cannot be inherited.

  Was this answer useful?  Yes

krishna singh

  • Dec 27th, 2015
 

No Class cannot be abstract and final both at a same time

  Was this answer useful?  Yes

baban

  • Feb 11th, 2016
 

Abstract class cannot create object but final class create a object
abstract class which have must a subclassed but final class which have no subclassed

  Was this answer useful?  Yes

Abstract Class
1. Could be Inherited.
2. Couldnt instatiated.
3. Could add few more methods.
4. Incomplete class
Final Class
1. Final version of Class
2. Couldnt be inherited.
3. Could be instantiated.
4. Couldnt add any more methods.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions