Created
March 1, 2019 21:41
-
-
Save oscarryz/263171aff2064c3162ebfb79faaf499c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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