GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  J2EE  >  Core Java
Go To First  |  Previous Question  |  Next Question 
 Core Java  |  Question 314 of 502    Print  
what is the difference between abstract class & Final class

  
Total Answers and Comments: 11 Last Update: June 05, 2008     Asked by: abhipsa 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
  Sorting Options  
  Page 1 of 2   « First    1    2    >     Last »  
October 02, 2006 01:20:35   #1  
hibapi Member Since: October 2006   Contribution: 3    

RE: what is the difference between abstract class & Fi...
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...
 
Is this answer useful? Yes | No
October 07, 2006 13:33:47   #2  
valanarasu Member Since: September 2006   Contribution: 9    

RE: what is the difference between abstract class & Fi...

For the final class we can create object. but for the abstract class we can not create object.


 
Is this answer useful? Yes | No
October 30, 2006 13:42:02   #3  
Varsha        

RE: what is the difference between abstract class & Fi...

Hi

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


 
Is this answer useful? Yes | No
November 04, 2006 20:05:48   #4  
faizy        

RE: what is the difference between abstract class & Fi...
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
 
Is this answer useful? Yes | No
November 07, 2006 00:57:09   #5  
Rajasekar        

RE: what is the difference between abstract class & Fi...

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..


 
Is this answer useful? Yes | No
November 23, 2006 06:41:51   #6  
avitra        

RE: what is the difference between abstract class & Fi...
abstract class can be extended where as final class cann't be extended
 
Is this answer useful? Yes | No
July 29, 2007 06:27:28   #7  
sujatham Member Since: January 2006   Contribution: 142    

RE: what is the difference between abstract class & Fi...
Abstract class cannot be instantiated.
Final class cannot be subclassed.

 
Is this answer useful? Yes | No
February 22, 2008 06:44:01   #8  
sampra Member Since: February 2008   Contribution: 278    

RE: what is the difference between abstract class & Final class
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
 
Is this answer useful? Yes | No
March 18, 2008 08:17:03   #9  
RaviKiran_CH Member Since: March 2008   Contribution: 2    

RE: what is the difference between abstract class & Final class
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.

 
Is this answer useful? Yes | No
June 05, 2008 08:23:08   #10  
vinaymudgil007 Member Since: May 2008   Contribution: 43    

RE: what is the difference between abstract class & Final class
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

 
Is this answer useful? Yes | No
  Page 1 of 2   « First    1    2    >     Last »  


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape