티스토리 뷰
배열 (arrangement)
: 같은 타입의 변수들을 하나로 묶어 다룸
예시)
int [ ] score = new int[3];
(배열의 선언과 생성을 한 번에 한 것)
배열 작성방법
1. 배열 선언하기 (참조변수 선언)
1) 타입[ ] 변수이름; ex. int[ ] score;
2) 타입 변수이름[ ]; ex. int score[ ];
2. 배열 생성하기 (저장공간 생성)
변수이름 = new 타입[길이]; ex. score = new int[5];
* 참조변수: reference variable
'Programming > Java' 카테고리의 다른 글
자바 기초 | 배열의 초기화, Array initialization in Java (0) | 2021.05.17 |
---|---|
자바 기초 | 배열의 길이, Length of arrangement in Java (0) | 2021.05.17 |
자바 기초 Basic of Java | this() 생성자와 참조변수 this, this( ) constructor & Reference variable this (0) | 2021.05.13 |
자바 기초 Basic of Java | What is Constructor? 생성자란? (0) | 2021.05.13 |
자바 기초 Basic of Java | How to use Overloading? 오버로딩 사용법 (0) | 2021.05.13 |
댓글
최근에 올라온 글
페이지 이동 안내
보던 글 목록 : 브라우저 뒤로 가기 메인 화면 : 좌측 상단 아이콘
보던 글 목록 : 브라우저 뒤로 가기 메인 화면 : 좌측 상단 아이콘
🍍 The GOAL: AI expert에 가까워지는 중
🍍 I am becoming AI expert who can develop cool things by coding.
🍍 I am becoming AI expert who can develop cool things by coding.