Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • Not always, you can use interface in one class if that class is a generic class. Commented Aug 8, 2012 at 5:29
  • 6
    Furthermore, you can introduce an interface when finally needed easily in modern IDE with an "extract interface" refactoring. Commented Aug 13, 2012 at 18:57
  • Consider a utility class where there are only public static methods and a private constructor - perfectly acceptable and promoted by authors like Joshua Bloch et al. Commented Mar 23, 2016 at 14:27