Skip to content

Instantly share code, notes, and snippets.

@objmagic
Created November 6, 2014 06:35
Show Gist options
  • Save objmagic/76eb90c136605495f5b9 to your computer and use it in GitHub Desktop.
Save objmagic/76eb90c136605495f5b9 to your computer and use it in GitHub Desktop.
Overloading
class Main {
public static void main(String[] a){
System.out.println(1);
}
}
class A {
public int run() {
int x;
x = 1;
return x;
}
}
class B extends A {
public boolean run() { // TE
int x;
x = 1;
return x;
}
}
class Main {
public static void main(String[] a){
System.out.println(1);
}
}
class A {
public int run() {
int x;
x = 1;
return x;
}
}
class B extends A {
public int run(int y) { // TE
int x;
x = 1;
return x;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment