2021年3月29日
摘要: File f = new File("F:/2021/img/cat.jpg"); // 列出所有的盘符c: d: e: 等等 File[] rootsFile = File.listRoots(); System.out.println(Arrays.toString(rootsFile)); / 阅读全文
posted @ 2021-03-29 14:33 情_结 阅读(64) 评论(0) 推荐(0)
  2021年3月28日
摘要: // 复制数组 方式一 int a[] = new int[] { 1, 2, 3 }; int b[] = new int[] { 4, 5 }; int c[] = new int[a.length + b.length]; for (int i = 0; i < c.length; i++) 阅读全文
posted @ 2021-03-28 13:34 情_结 阅读(38) 评论(0) 推荐(0)
摘要: 示例 Scanner scanner = new Scanner(System.in); System.out.println("输入nextLine"); String s1 = scanner.nextLine(); System.out.println("输入next"); String s2 阅读全文
posted @ 2021-03-28 12:16 情_结 阅读(102) 评论(0) 推荐(0)
摘要: Scanner scanner = new Scanner(System.in); System.out.println("身高:"); float height = scanner.nextFloat(); System.out.println("体重:"); byte tizhong = sca 阅读全文
posted @ 2021-03-28 11:47 情_结 阅读(118) 评论(0) 推荐(0)
摘要: //整型 byte b = 127;//-128~127 short s = 1;//-32768~32767 int it = 214700000;//-21亿4748万3648~21亿4748万3647 long l = 90000000000l;//-9223372036854775808~9 阅读全文
posted @ 2021-03-28 11:16 情_结 阅读(54) 评论(0) 推荐(0)