Skip to content

Instantly share code, notes, and snippets.

@rayjcwu
Created January 20, 2014 07:00
Show Gist options
  • Select an option

  • Save rayjcwu/8516105 to your computer and use it in GitHub Desktop.

Select an option

Save rayjcwu/8516105 to your computer and use it in GitHub Desktop.
You are creating some functionality intended to be private to the com.mycompany.marketing package. You have defined ian interface for which you plan on having a few package-speciic implementions. Your IDE insists that your implementation of doSomething must be public, yet the interface method is not public. Why is there a discrepancy? 1. All int…
package com.mycompany.marketing;
interface PackageLevelInterface {
void doSomthing();
}
public class MyClass implements PackageLevelInterface {
@Override
/// IDE insists on this being public (?)
public void doSomthing() {
// TODO: Auto-generated method stub
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment