1. 고전적인 System.arraycopy Java에서 각종 array를 복사하는 경우에 사용되었던 방식이다.입력받을 값에 미리 초기화해 놓아야 한다. int[] array = new int[] { 1, 2, 3, 4 };int[] copy = new int[4];System.arraycopy(array, 0, copy, 0, 4); 그리고 source와 destination의 시작위치를 지정할 수 있지만,경험상 잘 사용할 필요가 거의 없었다 2. 새로운 java.util.Arrays.copyOf (JDK6) int[] array = new int[] { 1, 2, 3, 4 };int[] copy = Arrays.copyOf(array, array.length);int[] other = Arrays.c..
자바에서의 기본적인 출력 방법과 데이터 타입의 특징에 대해 정리해본다. 자바 초보도 이해할 수 있는 문장으로 구성해보자. 1. System.out.println 이해하기 자바에서는 System.out.println을 통해 다양한 데이터를 화면에 출력할 수 있다. 기본 데이터 타입부터 문자열까지, 여러 방법으로 출력하는 것이 가능하다. class SystemOutPrintln { public static void main(String[] args) { System.out.println(7); System.out.println(3.15); System.out.println("3+5=" + 8); System.out.println(3.15 + "는 실수입니다."); System.out.println("3+5"..
- Total
- Today
- Yesterday
- 겨울
- 컴인워시
- Algorithm
- 가성비
- 여름
- 수원
- Algorithm Schedule
- 엔진오일
- NFT
- 겨울러그
- 맛집
- 단열벽지
- 삼성전자
- 데이터사이언스
- 에러
- 오미크론
- 다이나믹 프로그래밍
- 오픽
- 레스토랑
- 호텔
- problem
- 쿠팡
- 디아블로4
- 해결방법
- python
- 24년
- 코인
- 3만원대
- 원소술사
- 캠핑
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |