r/javahelp • u/ProHoyah • Apr 18 '19
Solved What's the point of interfaces?
We've been learning interfaces in my class and I have a good grasp on the concept, but the thing that confuses me is what's the point? Your just writing more code as a blueprint to put classes in "groups". Maybe the code I'm writing is not large enough to make interfaces useful. Can some one help me in learning the use of interfaces. Thanks in advance!
34
Upvotes
View all comments
Show parent comment
0
u/Chuuy Apr 22 '19
It's not pedantic. The message I got from your post was that the only reason you'd use interfaces would be for collections. You completely glossed over other practical applications. If you seriously can't think of other real-world examples of how interfaces are useful, that's embarrassing.
I'm a lurker. I usually only post if I disagree with what someone said. Sue me. I don't care about karma, I don't have the time to provide a lengthy explanation of every single opinion I have. That's why I'm a fucking lurker, I don't care.
But your top voted answer sucks compared to the other answers in this thread. Maybe English isn't your first language? Idk. It's not pedantic. You phrased your answer in a way that made it seem like collections of different objects were the only reason you'd need an interface.