what is abstract method with example?

Answers were Sorted based on User's Feedback



what is abstract method with example?..

Answer / abhishek,hingu

abstract method is a method whose implementation is
deferred to a subclass. Or, a method that has no
implementation

Is This Answer Correct ?    52 Yes 6 No

what is abstract method with example?..

Answer / vijay, hangar17

Abstract method is a method that has incomplete body. The
body is defined by the class which extends the abstract class.

Is This Answer Correct ?    34 Yes 6 No

what is abstract method with example?..

Answer / vikram

Hi Gopal, well I will explain u abstract methods in
layman's language. Sometimes, we want a method to perform
different functionalities. for eg. if suppose we have a
method dat finds d the area of geometric figures. Now every
geometric figure has different formula for calculating the
area. In dat case we go for abstract methods. where we just
declare a method by any name, in our case let it be "area
()". Now we can construct the body of this method depending
upon the type of geometric figure and the formula required
to find its area, seperately for all geopmetric figures.
But we will use the same name "area()" for all the methods
dat we define below to find the areas. I hope u got a vague
picture of abstract methods.

Is This Answer Correct ?    26 Yes 7 No

what is abstract method with example?..

Answer / srinivasa

A method without implementation

or

Abstract method does not contian the method body.It
contains method prototype . It is implemented in its sub
classes.

Is This Answer Correct ?    14 Yes 3 No

what is abstract method with example?..

Answer / sriragv

Abstrace method is a method which is having abstract
keyword and which may not be defined.

Is This Answer Correct ?    14 Yes 12 No

what is abstract method with example?..

Answer / syamsunder

Abstract method does not contain method body it contains only method header so we can say this is an in complete method.If a class contains a abstract method declare the class as a abstract and implementation can provides method body to all the abstract methods and also we can't create an object to abstract class

Is This Answer Correct ?    1 Yes 4 No

Post New Answer

More Core Java Interview Questions

Give few difference between constructor and method?

0 Answers  


What is use of arraylist in java?

0 Answers  


Can a constructor be private and how are this() and super() method used with constructor?

0 Answers   Flextronics, Hexaware,


Map map = new HashMap(2); map.add(“1”,”one”); map.add(“2”,”two”); map.add(“3”,”three”); What will happen at this line?

5 Answers   Rolta,


What are the object and class classes used for?

0 Answers  






Difference between Superclass and Subclass?

7 Answers  


Can a class be private?

0 Answers  


Which package has light weight components?

0 Answers  


What do you mean by a JVM?

0 Answers   GE,


What is thread start?

0 Answers  


Is empty set an element of empty set?

0 Answers  


Can you call a method in a method?

0 Answers  


Categories