Declaring Interface inside class file in Java
<p>in Objective-C we can define a protocol and a implementation in the same header file.
For example:</p>

<pre><code>@class GamePickerViewController;

@protocol GamePickerViewControllerDelegate &lt;NSObject&gt;
  - (void)gamePickerViewController:
    (GamePickerViewController *)controller 
    didSelectGame:(NSString *)game;
@end

@interface GamePickerViewController : UITableViewController

@property (nonatomic, weak) id &lt;GamePickerViewControllerDelegate&gt; delegate;
@property (nonatomic, strong) NSString *game;

@end
</code></pre>

<p>This way if I include the .h file I will have access to the protocol defined inside the file. 
I'm looking for a similar structure in Java cause I find it useful in some cases where I would like to avoid creating too many files (interface file+class file). 
That way I could declare:</p>

<pre><code>public class MyImplementation implements AnotherClass.MyInterface{
      AnotherClass otherClass;
}
</code></pre>

<p>I Think nested classes inside interfaces is the way to go. I am correct? or there's nothing similar in Java?</p>
