已采纳回答 / 慕粉2123195469
when you type into a line of words or codes,please end with "\n";for example:System.out.println("please enter a number:");Scanner s = new Scanner(System.in); String line = s.nextLine(); because nextLine()自动读取了被next()去掉的Enter作为他的结束符
2017-07-11
已采纳回答 / 慕粉13685516540
有啊,你第一个和第三个都是多态表示的,即父类引用的是子类的实例,我就简单对上面两个做一个比较,下面同理,第一个中的list只能使用List中的方法,调用子类方法就会报错,第二个可以使用本类和自称父类中的方法
2017-07-11
请检查代码中是否匹配:double e=d.doubleValue();,
method Number.doubleValue() is not applicable
method Number.doubleValue() is not applicable
2017-07-11
已采纳回答 / qq_StarFlower_0
重写equals语句是对当前类中的方法的,而调用的equals是String类中的,不是同一个类中的,我是这么理解的。不知道有没有错。
2017-07-11
这样也可以。。。
for(int i = 1;i<str.length();i=i+4){
str.insert(i,",");
}
for(int i = 1;i<str.length();i=i+4){
str.insert(i,",");
}
2017-07-11
泛型集合中的元素类型为指定泛型,取出时不需要进行类型转换;泛型集合中只能添加泛型及泛型的子类型的对象!
2017-07-11