Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


what is main purpose of abstract class?

Answers were Sorted based on User's Feedback



what is main purpose of abstract class?..

Answer / amit patel

Abstract class is used to implement common behavior which is
required by all subclasses but have some behavior which is
specific to subclass.

E.g., you want to implement a DocumentViewer App. Basic
operations are like open, view and close. open and close
requires no specific implementation while view require
specific implementation. Make DocumentViewer abstract,
implement open, close and make view as abstract. Now view is
responsibility of subclass. Like PDFViewer will have own
implementation for view()

Is This Answer Correct ?    14 Yes 1 No

what is main purpose of abstract class?..

Answer / rakesh@crr

if a class contains abstract method,that class must be
declared as a abstract class. abstract methods contains only
declarations. it does not contain objects.

Is This Answer Correct ?    16 Yes 12 No

what is main purpose of abstract class?..

Answer / surendra

Abstract classes are use to give functionality to the users.
The functionality is given by the class, use use this
functionality as per his/her requirements. Abstract classes
gives additional functionality to put one or two methods
common for each user and may put others abstract to fullfill
users requirements.

Is This Answer Correct ?    5 Yes 2 No

what is main purpose of abstract class?..

Answer / sumanth gatla

there is no rule that an abstract class must contain one
abstract method. with out single abstract method also
abstract class exist
eg........HTTPServlet

Is This Answer Correct ?    0 Yes 0 No

what is main purpose of abstract class?..

Answer / vishu

abstract class caontains only abstract mehtods all methods
that have to define before they are decalring in the next
class

& we dosn't create object of the abstract class

Is This Answer Correct ?    2 Yes 5 No

what is main purpose of abstract class?..

Answer / harshavardhan

In Inheritance , class become more general and more
abstract.Ancestor classes are more general, i.e more basis
for other classes.Abstract classes can have fields and
concrete methods.Methods are declared not defined so we can
not create objects. but we can create object variables of an
abstract class. but such variable must refer to an object of
a nonabstract subclass.

Is This Answer Correct ?    0 Yes 4 No

what is main purpose of abstract class?..

Answer / venkatesh

abstract class have atleast abstract method
it is maily used for to prevent create object of class.

Is This Answer Correct ?    2 Yes 8 No

Post New Answer

More Core Java Interview Questions

what is the difference between HashMap and Hashtable

17 Answers   Value Labs, Virtusa,


How do you declare an array that will hold more than 64KB of data?

0 Answers   Aspire, Infogain,


What is this () in java?

0 Answers  


why operator overloading is removed in java?

1 Answers  


Why are the methods of the Math class are static?

1 Answers  


4.1 Supply contracts (in the form of comments specifying pre- and post conditions) for the enqueue() method of the LinkedQueue class given in the Appendix. (2) 4.2 Let Thing be a class which is capable of cloning objects, and consider the code fragment: Thing thing1 = new Thing(); //(1) Thing thing2 = thing1; //(2) Thing thing3 = (Thing) thing1.clone(); //(3) Explain how the objects thing2 and thing3 differ from each other after execution of the statements. (

0 Answers  


Can we sort list in java?

0 Answers  


why did you choose your career in IT?

1 Answers   LIC,


Is there any use of an abstract class which has no methods and no attributes?

1 Answers   Wipro,


what do you mean by marker interface in java?

0 Answers  


What is the size of int in 64-bit jvm?

0 Answers  


What java ide should I use?

0 Answers  


Categories