javainterfacedirectory-structure

Java interfaces directory structure?


Should interfaces in Java reside in their own directory? Or should both the interface and its implementation be placed in the same directory (package)? Thanks.


Solution

  • Interfaces don't specifically need their own directory. They should be placed where it makes sense, just as classes should be placed where they make sense. In many cases, it may make sense to put them in the same place.