mirror of
https://github.com/autc04/Retro68.git
synced 2024-12-04 16:50:57 +00:00
22 lines
507 B
Java
22 lines
507 B
Java
|
public class pr24321 {
|
||
|
static class Z {
|
||
|
static {
|
||
|
System.out.println("init");
|
||
|
}
|
||
|
}
|
||
|
|
||
|
static class Y extends Z { }
|
||
|
|
||
|
public static Object x () { return new Object(); }
|
||
|
|
||
|
public static void main(String[] args) throws Throwable
|
||
|
{
|
||
|
System.out.println(x() instanceof Z);
|
||
|
|
||
|
ClassLoader cl = pr24321.class.getClassLoader();
|
||
|
Class zk = Class.forName("pr24321$Z", false, cl);
|
||
|
Class yk = Class.forName("pr24321$Y", false, cl);
|
||
|
System.out.println(zk.isAssignableFrom(yk));
|
||
|
}
|
||
|
}
|