일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- tensorflow
- Keras
- pycharm
- 데이터전문기관
- cudnn
- web
- 결합전문기관
- html
- web 용어
- C언어
- postorder
- mglearn
- CES 2O21 참여
- java역사
- paragraph
- 재귀함수
- broscoding
- classification
- web 개발
- 머신러닝
- 자료구조
- web 사진
- bccard
- vscode
- 웹 용어
- 대이터
- CES 2O21 참가
- inorder
- discrete_scatter
- KNeighborsClassifier
- Today
- Total
목록[IT] (431)
bro's coding

package step5; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; public class TestOutput { public static void main(String[] args) { // 파일을 생성하고 문자열을 출력하는 예제 // NodeStream ( FileWriter ) , ProcessingStream ( PrintWriter ) String path = "C:" + File.separator + "kosta215" + File.separator + "iotest" + File.separator + "output.txt"; try { // 장치(파..

package test; import java.util.Scanner; public class UnitTestLabel { public static void main(String[] args) { Scanner s=new Scanner(System.in); exit://label while(true) { System.out.println("1 , 2 중 입력해봅니다"); String info=s.nextLine(); switch(info) { case "1": System.out.println(info+" 등록"); break; case "2": System.out.println(info+" 종료"); //break;//해당 switch문만 벗어난다 //2를 입력받았을 때 전체 while 문을 벗어나려고..

package test; import java.util.Scanner; public class UnitTestLabel { public static void main(String[] args) { Scanner s=new Scanner(System.in); exit://label while(true) { System.out.println("1 , 2 중 입력해봅니다"); String info=s.nextLine(); switch(info) { case "1": System.out.println(info+" 등록"); break; case "2": System.out.println(info+" 종료"); //break;//해당 switch문만 벗어난다 //2를 입력받았을 때 전체 while 문을 벗어나려고..

IO(입출력) IO( InputStream, OutputStream, Reader, Writer) Stream 사전적 의미로는 줄기, 데이터의 입출력을 위한 파이프라인을 Stream이라고 함 ex) 콜라+빨대: 콜라를 입력 받기위한 스트림 입력스트림 : InputStream Reader 출력스트림 : OutputStream IO 계열의 4가지 추상 부모 클래스 1byte 2byte 입력스트림 InputStream Reader 출력스트림 OutputStream Writer package step3; import java.util.ArrayList; import java.util.Scanner; public class TestScanner2 { public static void main(String[] ar..

단위시간당 얼마나 source가 잘 도착했는지! throughput은 실재 도착한 량 Bandwidth는 최대 가능성을 의미

String 과 StringBuilder String 문자열 상수, 변하지 않는 속성 문자열 상수 영역(literal pool)에 저장되고 이를 공유해 사용 >메모리 절약 문자열에 변화를 가하면 새로 생성 동일한 문자열이 여러번 사용될 때 적합 StringBuilder 변하는 속성 문자열 자체가 변경 문자열 자체가 자주 변경될 때 적합 (StringBuilder와 StringBuffer는 동일하지만, StringBuffer는 thread-safe (동기화 처리)한 특징이 있음) package step3; public class TestStringAndStringBuilder { public static void main(String[] args) { String s1 = "아이유"; System.out...

Uncheck Exception 메서드나 생성자에서 별도의 throws가 필요없이 호출한 측으로 예외 발생시 던져짐 Exception은 Unchecked Exception과 checked Exception으로 구분할 수 있음 java.lang.RuntimeException 계열이 이에 속함 대표적으로 NullPointerException, IndexOutOfBountdsException (RuntimeException계열 이외의 모든 Exception은 checked Exception / 컴파일 타임에서 check / 프로그램 로직상에서 발생) package step2; // Exception은 Unchecked Exception과 checked Exception으로 구분할 수 있음 class Servi..

사용자 정의 예외( User Define Exception ) 특정 서비스를 구현할 때, 별도의 Exception이 필요하다면 사용자 정의 예외를 직접 만들어 사용 > extends Exception, 즉 java.lang.Exception class를 상속받아 사용 //ex) public class AgeException extends Exception{} case1 package step2; // 사용자 정의 예외 // 특정 예외 Exception class를 직접 정의 함 class AgeException extends Exception { AgeException() { // TODO Auto-generated constructor stub super("나이 정보에 문제가 있습니다.");// 부모 ..

throw Exception을 고의로 발생 //ex) public void test() throws XXException{ if(특정 예외상황){ throw new XXException(); } } java.Exception Handling(예외 처리).throw.UserDefineException(사용자 정의 예외) 사용자 정의 예외( User Define Exception ) 특정 서비스를 구현할 때, 별도의 Exception이 필요하다면 사용자 정의 예외를 직접 만들어 사용 > extends Exception, 즉 java.lang.Exception class를 상속받아 사.. broscoding.tistory.com

throws 예외 Exception을 던진다는 의미 해당 메서드가 실행시 예외 상황을 만나면 특정 Exception을 메서드를 호출한 측으로 던질 수도 있다는 의미 호출한 메서드가 throws하면 해당 Exception을 try/catch 혹은 throws를 해야함 ex) rv.readMemo("파일명")--call-->public void readMemo(String fileName) throws XXXException{ 정상적인 상황일때는 파일을 읽는다 만약 예외상황일 때는 예외를 호출한 곳으로 전달한다} package step2; import java.io.FileNotFoundException; import java.io.FileReader; class MemoService { // throws ..