From 65038f6d49ece8d1c582d75fddc8f967cfd927b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=96=87=E9=94=8B?= <2069827762@qq.com> Date: Thu, 8 Dec 2022 23:16:41 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AC=AC=E4=B8=83=E6=AC=A1=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20221208 \346\225\260\347\273\204.md" | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 "07 \345\210\230\346\226\207\351\224\213/20221208 \346\225\260\347\273\204.md" diff --git "a/07 \345\210\230\346\226\207\351\224\213/20221208 \346\225\260\347\273\204.md" "b/07 \345\210\230\346\226\207\351\224\213/20221208 \346\225\260\347\273\204.md" new file mode 100644 index 0000000..60bc946 --- /dev/null +++ "b/07 \345\210\230\346\226\207\351\224\213/20221208 \346\225\260\347\273\204.md" @@ -0,0 +1,29 @@ +## 笔记 + +1.一次性声明大量的用于存储数据的变量 + +2.要存储的数据通常都是同类型数据,例如:考试成绩 + +3.int[] scores = {100,100,100,100,100,100,100…} + +## 作业 + +``` java +public class D1 { + public static void main(String[] args) { + int[] arr = new int[5]; + Scanner sc = new Scanner(System.in); + System.out.println("请输入五个数"); + arr[0]= sc.nextInt(); + arr[1]= sc.nextInt(); + arr[2]= sc.nextInt(); + arr[3]= sc.nextInt(); + arr[4]= sc.nextInt(); + System.out.println(arr[0]); + System.out.println(arr[1]); + System.out.println(arr[2]); + System.out.println(arr[3]); + System.out.println(arr[4]); + } +} +``` \ No newline at end of file -- Gitee