Java Interfaces Methodology: Should every class implement an interface?

Posted by Amir Rachum on Stack Overflow See other posts from Stack Overflow or by Amir Rachum
Published on 2010-04-17T17:41:29Z Indexed on 2010/04/17 18:23 UTC
Read the original article Hit count: 165

Filed under:
|
|

I've been programming in Java for a few courses in the University and I have the following question:

Is it methodologically accepted that every class should implement an interface? Is it considered bad practice not to do so? Can you describe a situation where it's not a good idea to use interfaces?

Edit: Personally, I like the notion of using Interfaces for everything as a methodology and habit, even if it's not clearly beneficial. Eclipse automatically created a class file with all the methods, so it doesn't waste any time anyway.

© Stack Overflow or respective owner

Related posts about java

Related posts about interfaces