Skip to content

Instantly share code, notes, and snippets.

@Godin
Created December 12, 2011 19:57
Show Gist options
  • Save Godin/1468825 to your computer and use it in GitHub Desktop.
Save Godin/1468825 to your computer and use it in GitHub Desktop.
$ cat Foo.java
package example;
public class Foo {
public static void staticMethod(int a) {
System.out.println("Foo");
}
}
$ cat Bar.java
package example;
public class Bar {
public static void staticMethod(String a) {
System.out.println("Bar");
}
}
$ cat Example.java
package example;
import static example.Foo.staticMethod;
import static example.Bar.staticMethod;
public class Example {
public static void main(String[] args) {
staticMethod(0);
staticMethod("");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment