80,362
社区成员
发帖
与我相关
我的任务
分享
import java.util.HashSet;
public class java01 {
/**
* @param args
* @throws InterruptedException
*/
public static void main(String[] args) throws InterruptedException {
ST st=null;
pt(st);
System.out.println("bb:"+(st==null?"空":"非空"));
}
public static void pt(ST st){
st=new ST();
System.out.println("aa:"+(st==null?"空":"非空"));
}
}
public class ObjectArrayDemo {
public class DemoObject{
}
public static void main(String arg[]){
DemoObject object[] = new DemoObject[2];
new ObjectArrayDemo().pt(object);
System.out.println("bb:"+(object[1]==null?"空":"非空"));
}
public void pt(DemoObject[] st){
st[1]=new DemoObject();
System.out.println("aa:"+(st[1]==null?"空":"非空"));
}
}
表达有误,其实我是这个意思。好长时间没作JAVA,见谅......
import java.util.HashSet;
public class java01 {
/**
* @param args
* @throws InterruptedException
*/
public static void main(String[] args) throws InterruptedException {
ST[1] st=null;
pt(st);
System.out.println("bb:"+(st==null?"空":"非空"));
}
public static void pt(ST st){
st=new ST();
System.out.println("aa:"+(st==null?"空":"非空"));
}
}