为什么使用import com.imooc.second.*不能直接调用子包中的Telphone类,必须具体到import com.imooc.second.Telphone才可以
2019-04-01
public class Tel{
private float cpu;
public float getcpu(){
return cpu
}
public void setcpu(float newcpu){
cpu=newcpu;
}
省略构造方法
public static void main (String[ ])args
Tel a=new Tel(69f);
a.setcpu(33f);
system.out.println(a.getcpu());
private float cpu;
public float getcpu(){
return cpu
}
public void setcpu(float newcpu){
cpu=newcpu;
}
省略构造方法
public static void main (String[ ])args
Tel a=new Tel(69f);
a.setcpu(33f);
system.out.println(a.getcpu());
2019-03-16