Java public interface and public class in same file
<p>In a single .Java file, is it possible to have a public interface and a public class (which implements the interface)</p>

<p>I'm new to Java coding and it is written on most places on the net that a .java file cannot contain more than 2 public class. I want to know if it is true for the interface and a class also.</p>
