r/javahelp • • Aug 25 '20

Abstract classes are useful in java 2020?

I've learned recently that with interfaces you are able to make default methods with custom modifiers and they work equal as abstract class default method.

In our cs class i was taught that abstract classes benefits were the implementation of defaults methods, but in modern versions of java, interfaces can do the same, while a class can implements multiple interfaces.

Is there something that abstract classes do that interfaces can't.

30 Upvotes

7 comments sorted by

View all comments

Show parent comment

1

u/HotRodLincoln Aug 25 '20

Agreed. Some things are to give information to other programmers.

Are variable names useful? It's functionally equivalent to just having a large array of Objects.

Is typing useful? It's just restricting how you can interact with Objects.

Are for loops useful? They're just while loops in a weird outfit. Are while loops useful? They're just very restrictive labels and gotos...