package tms.route;
public class TrafficLight {
TrafficSignal signal;
public TrafficLight(){
TrafficSignal signal = TrafficSignal.RED;
}
public TrafficSignal getSignal(){
return signal;
}
public void setSignal(TrafficSignal signal){
this.signal = signal;
}
}
为什么我在别的类中不能用类命打点getSignal()调用这个方法呀