读书人

京东2014校园招聘2013年九月11日技术类

发布时间: 2013-09-12 22:07:04 作者: rapoo

京东2014校园招聘2013年9月11日技术类川大笔试题部分答案

java基础知识:

2.
System.out.println( 10 % 3 * 2 );
答案:2

3.
public static void main(String[] args){
String classFile = "com.jd.".replaceAll(".", "/") + "MyClass.class";
System.out.println(classFile);
}
答案:///////MyClass.class

4.
public static int func()
{
try{
return 1;
}catch (Exception e){
return 2;
}finally {
return 3;
}
}
答案:3

5.
public static void main(String[] args){
List<Integer> list1 = new ArrayList<Integer>();
list1.add(0);
List<Object> list2 = list1;
System.out.println(list1.get(0) instanceof Integer);
System.out.println(list2.get(0) instanceof Integer);

}
答案:编译错误

读书人网 >其他相关

热点推荐