배열5 [처음부터 다시 하는 JAVA] 배열 사용 처음부터 다시 하는 자바 공부는 인프런의 김영한 강사님의 강의를 참고해서 공부했다. 배열 사용 인덱스 배열은 변수와 사용법이 비슷한데, 차이점이 있다면 다음과 같이 [] 사이에 숫자 번호를 넣어주면 된다. 배열의 위치를 나타내는 숫자를 인덱스(index)라 한다. //변수 값 대입 students[0] = 90; students[1] = 80; //변수 값 사용 System.out.println("학생1 점수: " + students[0]); System.out.println("학생2 점수: " + students[1]); 배열 참조 그림 배열은 0부터 시작한다 new int[5] 와 같이 5개의 요소를 가지는 int 형 배열을 만들었다면 인덱스는 0,1,2,3,4 가 존재한다. 여기서 주의해야 할 점이.. 2024. 1. 16. [처음부터 다시 하는 JAVA] 배열 시작 처음부터 다시 하는 자바 공부는 인프런의 김영한 강사님의 강의를 참고해서 공부했다. 배열 시작 배열이 필요한 이유 학생의 점수를 출력하는 간단한 프로그램을 작성해보자. package array; public class Array1 { public static void main(String[] args) { int student1 = 90; int student2 = 80; int student3 = 70; int student4 = 60; int student5 = 50; System.out.println("학생1 점수: " + student1); System.out.println("학생2 점수: " + student2); System.out.println("학생3 점수: " + student3); Sy.. 2024. 1. 15. [JavaScript] 유용한 자바스크립트 내장 함수들 복습 https://shins99.tistory.com/52 [JavaScript] 객체 (Object) 복습 https://shins99.tistory.com/51 [JavaScript] 배열 (Arrays) 복습 https://shins99.tistory.com/50 [JavaScript] 제어문 (if, switch, for, while, do~while) 복습 https://shins99.tistory.com/49 [JavaScript] 연산자 복습 https://shins99.tistory.c shins99.tistory.com 유용한 내장함수들 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 .. 2023. 8. 22. [JavaScript] 배열 (Arrays) 복습 https://shins99.tistory.com/50 [JavaScript] 제어문 (if, switch, for, while, do~while) 복습 https://shins99.tistory.com/49 [JavaScript] 연산자 복습 https://shins99.tistory.com/47 [JavaScript] 변수와 자료형 복습 https://shins99.tistory.com/47 [JavaScript] 자바스크립트(JavaScript)란? 자바스크립트(JavaScript) - 사 shins99.tistory.com 배열이란? - 자바스크립트에서 배열(array)은 이름과 인덱스로 참조되는 정렬된 값의 집합으로 정의 - 배열을 구성하는 각각의 값을 배열 요소(element)라고 하며,.. 2023. 8. 21. [자바 기초] 배열 복습 https://shins99.tistory.com/23 [자바 기초] static 복습 https://shins99.tistory.com/21 [자바 기초] C R U D 의 개념 복습 https://shins99.tistory.com/20 [자바 기초] this 키워드 복습 https://shins99.tistory.com/18 [자바 기초] 접근 제어 지시자, get(), set() 메서드 복습 https shins99.tistory.com 💡 학습 목표 1. 배열에 선언과 값을 넣는 방법 2. 배열에 길와 인덱스 번호는 다르다 3. 배열안에 들어가는 데이터 종류는 어떤것들이 있을까? 배열 (Array) - 연관된 데이터들을 하나의 변수에 모아서 통으로 관리하기 위해 사용하는 리스트 자료 구조 .. 2023. 8. 4. 이전 1 다음