1.当你要决定去当一个程序员的时候,首先面试上,收到通知,根据公司需求先看下了解他大体会出现什么考题
2.我今天面试的是一家需要有用到java8api以及英语阅读的java初级程序员
先讲下上机他给出2题要求java8新特性
全英文,1.介绍了给定一个数据Integer类型要求要返回比6大的数,如果没有抛异常
public Integer max(Integer numbers[])throws Exception{}
我的答案:
public Integer max(Integer numbers[])throws Exception{
List<Integer> maxs= Arrays.asList(numbers);
Integer max=Collections.max(maxs);
if(max.equals(6)||max.intValue()>6){
return max;
}else{
throw new Exception();
}
}
2.要求给定一个数组求出它里面出现次数最多的一个数没有空数组存在数组没有次数相同的存在。
public String often(String chars[]){}
问了8大基本数据类型,以及封装类与void然后还有java8有哪些特性