Java Interfaces

Posted by Mandar on Stack Overflow See other posts from Stack Overflow or by Mandar
Published on 2010-05-01T16:05:15Z Indexed on 2010/05/01 16:07 UTC
Read the original article Hit count: 330

Filed under:
|
|
|

I have a doubt..

Why do we need interfaces ?
Can't we acheive the same effect by writing the implementation directly in the class?

It would be great if you could illustrate your point with an example.
Thanks in advance.

© Stack Overflow or respective owner

Java - Interfaces

Posted by RayAllen on Stack Overflow See other posts from Stack Overflow or by RayAllen
Published on 2010-05-01T15:37:52Z Indexed on 2010/05/01 15:47 UTC
Read the original article Hit count: 330

Filed under:
|
|

I had a doubt ..

Why do we need interface in Java ?
Instead of interface can't we write the methods in the class itself ?
Why do we need seperate interface?

© Stack Overflow or respective owner

Related posts about java

Related posts about interface