Skip to content

Instantly share code, notes, and snippets.

@oscarryz
Created March 1, 2019 21:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oscarryz/263171aff2064c3162ebfb79faaf499c to your computer and use it in GitHub Desktop.
Save oscarryz/263171aff2064c3162ebfb79faaf499c to your computer and use it in GitHub Desktop.
abstract class A {
public String s() {
return this.getClass().getName();
}
}
class B extends A {
public static void main(String...args) {
System.out.println(B.class.getName());
System.out.println(new B().s());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment