Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Java by (6.5k points)
What is the ideal use case for abstract classes?

1 Answer

0 votes
by (11.3k points)

Abstract classes have various implementations:

  • If a lot of your program logic implementation is of the same sort and follows a common behavior.  
  • If you have to implement a generalized template for your subclasses to inherit functionality from according to their own requirements. 
  • If you want to implement planned inheritance hierarchy as well as a good choice for non-leaf classes in class hierarchical structures. 
  

Abstract classes are used tremendously in Java development routines and are generally considered good practice in Java programming. If you're looking to learn java, you should definitely research such coding practices and implements more. 

Related questions

0 votes
0 answers
0 votes
1 answer
0 votes
1 answer
asked Feb 20, 2020 in Java by angadmishra (6.5k points)

Browse Categories

...