最新回答 / 我爱娟娟
Scanner console=new Scanner(System.in); //声明输入变量consoleString stuID=console.next();// 把输出内容console.next()赋值给stuID;
2017-03-22
最新回答 / Johnny_Zhang
coursesToSelect这个字段为空哦,所以报了Null 指针异常,而且定义为static final的话就永远等于空啦可以改成private static List<Course> coursesToSelect = new ArrayList<Course>();
2017-03-21
最新回答 / qq_慢一点_0
Course temp=(Course)coursesToSelect.get(0);Course是类名,temp是变量名。就好比int a;你也可以写成Course abc;
2017-03-20
最赞回答 / Gir非碼農
fileName.lastIndexOf(".")>0 && fileName.substring(index+1).equals("java")首先equals拼错了,其次,lastIndexof不能这么用,并且indexof里既然有了"."就不要string了,况且要用也是String(虽然还是不能通过)
2017-03-19
最新回答 / nuanchazy
value是一个Collection类,Collection包含了:Set、List和Queue。他可以是Set也可以是List亦可以是Queue。程序中的value是Student,未用泛型规定其为Set或List类,就是默认的Collection类。当然你也可以用泛型规定value是指定类型类。例如:Map<String,List<String>> map= new HashMap<String, List<String>>(); List<Str...
2017-03-19
最新回答 / 慕粉3606918
对于基本数据类型(int, double, byte,......),使用“==”比较的是它们的值;而对于复合数据类型(类)的对象,使用“==”比较的是它们的地址/引用。
2017-03-17
最新回答 / qq_竹心_2
调用scanner的方法错了吧,调用nextLine()方法,它是返回String类型的