67,512
社区成员
发帖
与我相关
我的任务
分享
int []a={1,2};
int []b=a;
b[0]=3;
//a[0]这个时候也变成了3,因为他们的指针都没改变,指向同一个内存地址。
public static void main(String[] args) {
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String d="2009-12-05 12:22:59";//表示取出的字符串
try {
System.out.println(sdf.format(sdf.parse(d)));
} catch (ParseException e) {
e.printStackTrace();
}
}
package test;
public class A {
/**
* @param args
*/
public static void main(String[] args) {
MyInteger in = new MyInteger(123);
MyInteger b = in;
b.setNum(10);
System.out.println(in.getNum());
}
}
class MyInteger{
public MyInteger(int num){
this.setNum(num);
}
private int num;
public int getNum() {
return num;
}
public void setNum(int num) {
this.num = num;
}
}
3.dwr框架,主流的ajax框架,去学吧。