摘要:
问题:i += j只是i = i + j的简写么?答案:非也!看下面的程序:int i = 5;long j = 8;i += j; // 可以通过编译且结果正确i = i + j; // 无法通过编译,类型转换问题其实,Java会将i += j转换为i = (int)(i + j)来执... 阅读全文
摘要:
Java always passes arguments by value NOT by reference.Let me explain this through anexample:public class Main{ public static void main(String[] a... 阅读全文