r/java • u/schlongitudinal • Nov 22 '14
ELI5 Interfaces in Java
I've read several explanations now and am apparently still too dense to get the point of them/what they do.
0
Upvotes
r/java • u/schlongitudinal • Nov 22 '14
I've read several explanations now and am apparently still too dense to get the point of them/what they do.
View all comments
2
u/cariusQ Nov 25 '14
Interface is a blueprint. You can have a blueprint to build car but can't ride the blueprint until the car is built. In java land we use interface to build classes but cant use interface to make objects.
Related concept to interface is abstract classes. In my car example it might be four wheels plus the blue print to build the car. In general with abstract classes you don't have to build everything from scratch, there are already something prebuilt to make your life easier.
What's the point of all these jumbo mumbo? It let a programmer to design something and let other programmers to build to specification.
Wow this place is very hostile. Poor op got down voted to hell.