猜猜下面三段,哪些能正常运行?
1.class Tset_1314{
public static void main(String[] args) {
Person q = new Person();
System.out.println(q.p);
}
}
class Person{
boolean p;
}
2.class Tset_1314{
public static void main(String[] args) {
Person q = new Person();
q.speak();
}
}
class Person{
void speak() {
int x ;
System.out.println(x);
}
}
3.class Tset_1314{
public static void main(String[] args) {
int y;
System.out.println(y);
}
} |