블로그
-
40번째 퍼즐 - 주저하는 생성자
throws Exception { throw new Exception("I'm not coming out"); } public static void main(String[] args) { try ; } catch (Exception e) { System.out.println("I told you so"); } }}Colo.......
blog.naver.com · 2015.04.23
-
42번째 퍼즐 - 어이없다
{ int[][] tests = {{6, 5, 4, 3, 2, 1}, {1, 2}, {1, 2, 3}, {1, 2, 3, 4}, {1}}; int successCount = 0; try { int i = 0; while (true) { if (thirdElementIsThree(tests[i++])) { successCount++; } } } catch (ArrayIndexOutOfBoundsException
blog.naver.com · 2015.04.28
-
[KOSTA 87기]2014년 10월 6일 월요일(10일차) 학습내용 정리 및 지난 수업내용 정리
0으로 나누는 코드 // 배열의 index 제어하는 코드 * 이점: 문제가 발생해도 일단 프로그램을 안정적으로 실행 * 객체지향언어에서 예외처리를 할수 있도로 아래 블럭제공 * * try { * * }catch(E.......
blog.naver.com · 2014.10.06
-
Visual Basic.Net의 문법 익히기
Statements) - 조건문과 반복문 등 - 을 먼저 알아 보겠습니다. 1) Conditional Statement ( 조건문 ) 조건문에는 크게 IF 문과 Selct Case 문과 Try Catch 문이 있습니다.
blog.naver.com · 2014.07.09
-
Java - File Hash 값 추출
public class DigestUtils { public static String extractStringHashSHA256(String str){ String SHA = ""; try sb.append(Integer.toString((byteData[i]&0xff) + 0x100, 16).substring(1)); } SHA = sb.toString(); }catch
blog.naver.com · 2014.06.18
-
try catch 구문 Exception 로그 찍는방법
try { } catch(Exception e) { e.printStackTrace(); }
blog.naver.com · 2013.10.11
-
[영진전문대 컴퓨터정보계열] 자바 데이터베이스 레코드 추가
mysql://222.104.147.164/book_db"; String id = "root"; String password = "4321"; Connection con = null; try 성공"); con = DriverManager.getConnection(url, id, password); System.out.println("데이터베이스 연결 성공"); } catch
blog.naver.com · 2013.11.25
-
[영진전문대컴퓨터정보계열프로그래밍전공] 11월 25일 수업내용
mysql://localhost/book_db"; String id = "root"; String password = "password"; Connection con = null; try 적재 성공"); con = DriverManager.getConnection(ur1, id, password); System.out.println("데이터베이스 연결 성공"); }catch
blog.naver.com · 2013.11.25
-
c++에서 제공하는 예외기능 및 auto_ptr
************************************************ bad_alloc => c++에서 메모리 할당시에 오류발생시, 오류를 넘겨주는 방법. try { char *p = new char[10000000000000000000000000000000000000000000000000] =>에러발생. }catch(bad_alloc
blog.naver.com · 2013.11.26
-
[영진전문대학 컴퓨터정보계열]
Buffer{ private int data; private boolean empty = true; public synchronized int get(){ while(empty){ try empty){ try{ wait(); }catch(InterruptedException e){ } } empty = false; this.data = data; notifyAll()
blog.naver.com · 2013.10.30