怎么在别的CLASS拿到MAIN CLASS数据
两个class,分别a跟b
A是main, 里面创建了一个vector, 怎么才能把vector size送到class B那里?
public class A{
public void static main (String[] args){
Vector abc = new Vector();
int i = abc.size();
}
}
public class B{
private Integer Size;
public Integer getSize(){
return this.Size;
}
protected void setSize(Integer Size){
this.Size = Size;
}
public void print(){
System.out.print("The size is " + this.Size);
}
}