最新回答 / Jack_Li
<...图片...><...图片...>构造器的参数类型是(int,String,float,int),但是你创建的时候确是(int,String,String,String)
2019-05-28
最赞回答 / Georgephy
getScreen 意思是获得screen 所以这个方法需要返还screen的值
setScreen 意思是设置screen 所以这个方法只需要设置screen的值,也就是给他赋值,不需要使用到他,所以不用返回值
为什么要getter&setter方法?
因为安全性问题,类要私有化属性,又因为私有化了,该属性只能在本类中访问,所以要在本类中使用getter&setter方法,提供简单的入口让外部也能间接操作这些私有属性
2019-05-25
最新回答 / 慕妹1146461
可以给你个参考,还是很粗略的,不够严谨:public class Begin { public static void main(String[] args) { System.out.println("欢迎使用滴答租车系统~~~"); System.out.println("是否开始订单?请按提示输入"); System.out.println("是:1 否:2"); Scanner sc = new Scanner(System.in); int a = sc.nextInt();...
2019-05-24
最新回答 / Ai590
int[] a = new int[100]; for(int i = 0 ; i < 100; i ++){a[i] =(int)( Math.random()*100+1);}
2019-05-18