面经
13/08/2014 第一个technical全职面
Java:
Integer i = 10;
incr(i);
// Is i now 11?
void incr(Integer val) {
val ++;
return;
}
int i = 10;
incr(i);
// Is i now 11?
void incr(int val) {
val ++;
return;
}
int是primitive type,属于immutable的
Integer也是immutable的
java始终是pass by value的
感触:基本功非常重要,以及刷题是王道啊
posted on 2017-04-30 21:45 cynchanpin 阅读(134) 评论(0) 收藏 举报
                    
                
                
            
        
浙公网安备 33010602011771号