摘要: import org.junit.Test; public class Demo { public int test = 1; @Test public void test2(){ /* 数组、对象(String等除外)作为参数传递,是引用传递, 引用传递是改变原来属性的值的,如例1、例2 */ S 阅读全文
posted @ 2020-12-10 20:03 JadeXu07 阅读(3387) 评论(0) 推荐(0)
摘要: import org.junit.Test; public class Demo { @Test public void test1(){ /* 关于数组输出的测试 char[]直接输出时,各字符会拼接成字符串输出。 char[]拼接字符串后再输出,则输出数组的地址值。 引用数据类型输出类名+地址值 阅读全文
posted @ 2020-12-10 20:02 JadeXu07 阅读(1827) 评论(0) 推荐(0)
摘要: public class Main { static byte b; static short s; static int i; static long l; static float f; static double d; static boolean bool; static char c; s 阅读全文
posted @ 2020-12-10 20:00 JadeXu07 阅读(574) 评论(0) 推荐(0)
摘要: switch语句中支持的变量类型有 byte、short、int、char Java SE 5 开始,支持新特性enum 从 Java SE 7 开始,switch语句支持字符串 String 类型了,同时 case 标签必须为字符串常量或字面量。 如下题,因为switch只支持 byte、shor 阅读全文
posted @ 2020-12-10 19:57 JadeXu07 阅读(844) 评论(0) 推荐(0)