GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  Concepts  >  OOPS
Go To First  |  Previous Question  |  Next Question 
 OOPS  |  Question 17 of 64    Print  
can we create a object of Base class?..
If we can not create a object of base class then why we need Abstract class?

  
Total Answers and Comments: 5 Last Update: August 11, 2008     Asked by: abhishek 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: ABYSS
 

Yes, we can create an object of the Base class.

If we make a class as abstract then we can't create an object of that class.

we can create only pointer of that class this is because to provide one interface to access and so that runtime time polymorphism can implement.



Above answer was rated as good by the following members:
achintya
May 22, 2006 23:35:53   #1  
Rama        

RE: can we create a object of Base class?..If we...
Yes , u can create an object of base class.but until and unless u prefix it with a keyword abstract
 
Is this answer useful? Yes | No
June 05, 2006 02:05:03   #2  
Rohini Ram Member Since: June 2006   Contribution: 1    

RE: can we create a object of Base class?..If we...
Yes we can create object to the base class. Abstract class is nothing but a class in which some function have definitions and some have only declarations.
 
Is this answer useful? Yes | NoAnswer is useful 0   Answer is not useful 1Overall Rating: -1    
September 08, 2006 17:15:18   #3  
RAJEEV16706 Member Since: September 2006   Contribution: 7    

RE: can we create a object of Base class?..If we...

Hi,

There are only two mechanism in java to define a type with multiple implementations those are interfaces and abstract classes.

abstract class permit implementation of some methods in it and interface not.


 
Is this answer useful? Yes | No
October 12, 2006 02:02:02   #4  
ABYSS        

RE: can we create a object of Base class?..If we...

Yes, we can create an object of the Base class.

If we make a class as abstract then we can't create an object of that class.

we can create only pointer of that class this is because to provide one interface to access and so that runtime time polymorphism can implement.


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
August 06, 2008 13:35:48   #5  
VCCoder Member Since: August 2008   Contribution: 4    

RE: can we create a object of Base class?..If we can not create a object of base class then why we need Abstract class?
Abstract class is class having atleast one pure virtual function.
 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape