+ 1
Example for interface in java
4 Respostas
+ 13
edit ::: i removed mine explanation , as it was funny ... btw have alook at these for more examples
https://www.codeproject.com/Questions/43970/Real-world-examples-of-abstract-classes-and-interf
https://www.quora.com/Could-any-one-give-me-a-Real-world-example-of-interface-and-abstract-classes-of-java
+ 1
real world example
0
Runnable
If you want to make a Thread (for doing things simultaneously), you just inherit from the Interface so the JVM knows:"Okay my small class, you want t be a thread? Let's do it! I know you are able to do it, because you are just like a real Thread because of that interface and so you habe the run()-Method, for example! Excellent!"
Any more questions? ;-)