I have 3 classes
我有3节课
public class GameInfo
{
private int num;
public void setNum(int num){
this.num=num;
}
public int getNum(){
return num;
}
}
public class NewGame
{
public void foo(){
GameInfo g = new GameInfo();
g.setNum(10);
}
}
public class StartGame()
{
//i want to access the num in GameInfo being set by NewGame class. How to do that?
}
public class GameInf