Recent Posts
Recent Comments
Link




일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 플젝후체크
- gitbash
- github markdown
- Anaconda
- expression statement is not assignment or call html
- PID
- 마크다운
- 자바파이썬
- #스파르타코딩클럽후기 #내일배움캠프후기
- 서버사이드렌더링
- 코딩온라인
- 카우치코딩 #couchcoding #6주포트폴리오 #6주협업프로젝트v
- 모바일웹스킨
- terminate
- address
- taskkill
- github
- Kakao
- Machine Learning
- khaiii
- 카우치코딩 #couchcoding #6주포트폴리오 #6주협업프로젝트
- SSR
- 파이썬
- 출처: 자바의 신 8장
- 비동기
- 파이콘
- 클라이언트사이드렌더링
- Technical Writing
- Morphological analysis #Corpus
- 필사
Archives
- Today
- Total
개발 일기
참조 자료형 초기화 필수 본문
모든 참조 자료형은 초기화(new 라는 예약어를 써서 생성자를 부르는 작업)를 하지 않으면 null이다.
참조 자료형 배열 각각의 값은 반드시 각각의 값을 초기화해줘야만 null이 되지 않는다.
public class ArrayInitValue {
public static void main(String[] args) {
ArrayInitValue array = new ArrayInitValue();
array.referenceTypes();
}
public void referenceTypes() {
String[] strings = new String[2];
ArrayInitValue[] array = new ArrayInitValue[2];
System.out.println("string[0]= " + strings[0]);
System.out.println("array[0]= " + array[0]);
}
}
Comments