为什么实例变量不能输出?
package exercise;
public class firstCup {
String wall;
String bowlCover;
void drink(){
System.out.println("firstCup有喝水的功能!");
}
void save(){
System.out.println("firstCup有储存的功能!");
}
}
--------------------------------***************************----------------------------------------
package exercise;
public class InitialCup {
public static void main(String[] args) {
// TODO Auto-generated method stub
firstCup Cup=new firstCup();
Cup.drink();
Cup.wall="pp";
Cup.bowlCover="pp";
Cup.drink();
}
}