public class Demo {
/**
* @param args
*/
public static void main(String[] args) {
MyThis a = new MyThis();
a.setId(12);
a.getId();
MyThis b = new MyThis();
b.setId(13);
b.getId();
}
class MyThis{
private int id;
public void setId(int id){
this.id = id;
}
public void getId(){
System.out.println(this.id);
}
}
}
更多0
|
|