Why should I use abstract class?



Why should I use abstract class?..

Answer / Sanjay Kumar Gond

An abstract class in Core Java can be used to define a common set of methods that must be implemented by its subclasses. This can help promote code reusability, encapsulation, and polymorphism. It also allows for more flexibility when designing hierarchies of related classes.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

what is jdk1.5 features?

6 Answers   AMS, Virtusa,


What is the independent variable in an experiment?

1 Answers  


Can any one say how will sort map objects in java?

2 Answers   TCS,


What is the purpose of premetive data types in java?

2 Answers   Merrill Lynch, TCS,


List out benefits of object oriented programming language?

1 Answers  


What is collection sort in java?

1 Answers  


what is difference between Exception and Error?

36 Answers  


Is integer passed by reference in java?

1 Answers  


what is java bean?where can we use it?

12 Answers   TCS,


Should database connections be singleton?

1 Answers  


Give some features of interface?

1 Answers  


Explain importance of throws keyword in java?

1 Answers  


Categories