62,615
社区成员
发帖
与我相关
我的任务
分享
public class TT {
public static void main(String[] args) {
B b=new B();
System.out.println(b.getA());
System.out.println(b.getB());
}
}
class A {
int x = 1;
public int getA() {
return x;
}
}
class B extends A {
int x = 2;
public int getB() {
return x;
}
}
class A {
static int MIN_PRIORITY = 59;
};
public class Obscure {
static A Thread;
public static void main(String args[]) {
// print value of class
// variable Thread.MIN_PRIORITY
System.out.println(Thread.MIN_PRIORITY);
// print value of
// java.lang.Thread.MIN_PRIORITY
System.out.println(java.lang.
Thread.MIN_PRIORITY);
}
}
public int getC() {
return super.x;
}