JAVA试题(100道) —————————————————————————————————————— 题目1: 下面不属于基本类型的是:c (选择1项) A) boolean B) long C) String D) byte 题目2:d 如下程序中: (1)public class CharToInt (2){ (3) public static void main(String[] args) (4) { (5) int a,b=10; (6) char c='语'; (7) a=b+c
Java中变量的传递,是传值,还是传引用?
之前我对这个"经典"问题,认识很不深刻,直到我在项目中遇到类似下面的问题:
示例A:
List perList = new ArrayList();
for (int i = 0; i < idList.length(); i++) {
Person person = new Person();
//设置属性
person.setId(i+1);
person.setName("Lin");
perso