package Query; import java.sql.Connection;import java.sql.DriverManager;import java.sql.ResultSet;import java.sql.SQLException;import java.sql.Statement; public class CRUDTest {Connection con; static {try {Class.forName("oracle.jdbc.driver.OracleDriver");// JDBC 드라이버 클래스 네임} catch (ClassNotFoundException cne) {cne.printStackTrace();// jar 파일이 존재하지 않을 경우}} public void connect() { // 연결 메소드try {co..
package practice; import java.util.HashSet;import java.util.Iterator; public class HashSetEx5 { public static void main(String[] args) {// TODO Auto-generated method stubHashSet setA = new HashSet();HashSet setB = new HashSet();HashSet setHab = new HashSet();HashSet setKyo = new HashSet();HashSet setCha = new HashSet(); setA.add("1");setA.add("2");setA.add("3");setA.add("4");setA.add("5");System..
package practice; import java.util.Collections;import java.util.HashSet;import java.util.LinkedList;import java.util.List;import java.util.Set; public class HashSetLotto { public static void main(String[] args) {// TODO Auto-generated method stub Set set = new HashSet();// 해쉬셋을 인스턴스로 갖는 셋 참조변수 생성 (다형성) for (int i = 0; set.size() < 6; i++) {int num = (int) (Math.random() * 45) + 1;// 임의의 1~45 사이의..
package practice; import java.util.HashSet;import java.util.Set; public class HashSetEx1 { public static void main(String[] args) {// TODO Auto-generated method stub Object[] objArr = { "1", new Integer(1), "2", "2", "3", "3", "4", "4","4" };Set set = new HashSet(); // 해쉬셋 생성// Set set = new LinkedHashSet(); //해쉬셋 생성(정렬된 데이터) for (int i = 0; i < objArr.length; i++) {set.add(objArr[i]);// 중복되는 값을..
package practice; import java.util.ArrayList;import java.util.Iterator; public class IteratorEx2 { public static void main(String[] args) {// TODO Auto-generated method stubArrayList original = new ArrayList(10);ArrayList copy1 = new ArrayList(10);ArrayList copy2 = new ArrayList(10);// 3개의 Array List 객체 생성 for (int i = 0; i < 10; i++) {original.add(i + "");// 객체 삽입}Iterator it = original.iterato..
package practice; import java.util.ArrayList;import java.util.ListIterator; public class ListIteratorEx1 { public static void main(String[] args) {// TODO Auto-generated method stub ArrayList list = new ArrayList();list.add("1");list.add("2");list.add("3");list.add("4");list.add("5"); ListIterator it = list.listIterator();// 리스트 이터레이터 객체 생성 while (it.hasNext()) {System.out.println(it.next());// ..
package practice; import java.util.ArrayList;import java.util.Iterator; public class IteratorEx1 { public static void main(String[] args) {// TODO Auto-generated method stub ArrayList list = new ArrayList();list.add("1");list.add("2");list.add("3");list.add("4");list.add("5");//ArrayList 생성 및 객체 추가 Iterator it = list.iterator();//이터레이터 생성while (it.hasNext()) {Object obj = it.next(); //다음 객체를 읽음,..
package practice; import java.util.LinkedList;import java.util.Queue;import java.util.Stack; public class StackQueueEx { public static void main(String[] args) {// TODO Auto-generated method stub Stack st = new Stack();Queue q = new LinkedList();// LinkedList는 Queue 인터페이스를 구현하였다. st.push("0");st.push("1");st.push("2");// 스택에 넣기 q.offer("0");q.offer("1");q.offer("2");// 큐에 넣기 System.out.println("..
- Total
- Today
- Yesterday
- 프로젝트
- 도전과제
- 클래스
- 자바
- 충북대
- 정렬
- 알고리즘
- SQL
- 안드로이드
- jsp
- 잡담
- db
- 파이썬
- 이론
- 메모장
- 청주
- 졸업작품
- 게임
- HTML
- 소켓
- JQuery
- CSS
- 정보
- 데이터베이스
- 자바스크립트
- 오라클
- 아두이노
- SVN
- 배열
- ERP
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |