public class FileCopy { public static void main(String[] args) { try { Path from = Paths.get("c:/Temp/dir/house.jpg"); Path to = Paths.get("c:/Temp/dir/house2.jpg"); FileChannel fcFrom = FileChannel.open(from, StandardOpenOption.READ); FileChannel fcTo = FileChannel.open(to, StandardOpenOption.CREATE, StandardOpenOption.WRITE); ByteBuffer bb = ByteBuffer.allocateDirect(1024); int byteCount; whil..
1. 리스트(List) 컬렉션1) ArrayListList list = new ArrayList();==> 는 type parameter. List list = new ArrayList(30);==>String 타입 객체 30개를 저장할 수 있는 용량을 가짐 순서가 있음중복이 가능함배열과 매우 유사함 package chapter15; import java.util.ArrayList; import java.util.List; public class ArrayListEx { public void ex1() { List list = new ArrayList(); list.add("Java"); list.add("JDBC"); list.add("servlet/JSP"); list.add(2, "Database"..
Q. 왜 제네릭을 사용해야 할까?java5부터 제네릭(Generic)타입이 새로 추가되었다. 1. 타입 체크코드에서 잘못 사용된 타입 때문에 발생하는 문제점을 제거하기 위해 제네릭 코드에 대해 강한 타입 체크를 한다. --> 에러를 사전에 방지 2. 타입 변환(casting)을 제거비제네릭 코드는 불필요한 타입 변환을 하기 때문에 프로그램 성능에 영향을 끼친다. ---- Generic Test ----package chapter13; import java.util.ArrayList; import java.util.List; public class GenericTest { public void ex1() { //제너릭을 사용하지 않은 경우 저장된 데이터는 반드시 캐스팅해야 함 List data = new ..
- Total
- Today
- Yesterday
- MONTH_BETWEEN
- 멤버 클래스
- SQL Operator
- !(not)
- casring
- IS RECORD
- 상속
- SELECT절 명령어
- NVL()
- hierarchical query
- Generic Type
- 복수행 함수
- 계층형 쿼리
- Interface
- Maven Project
- 데이터 딕셔너리
- FileChannel
- z-dindex
- GROUP BY절
- 테이블 데이터 복사
- implements
- 중첩 클래스
- CLASS
- NVL2()
- DECODE()
- IN(var1 var2 var3)
- DI(의존성 주입)
- tables in htmll
- 로컬 클래스
- 타입변환과 다형성
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |