본문 바로가기
#13-4 / I/O 🔥 👀 선생님 전체 정리 내용https://dev-eunse.tistory.com/99 👀 내가 해본 전체 정리 내용https://dev-eunse.tistory.com/92 I/O : input/output input - 키보드,마우스,Hdd,File ..등output - 모니터,프린터.. 등 java.io > java.nio 👀I/O는 무조건 예외처리를 사용해야한다  - 넣지 않으면 작동불능!load할 파일명과 경로가 올바른 상황이면 try/그 반대 상황은 catch 🔽 파일 첨부 기능 제작시 주로 사용public static void main(String[] args) { try {//io는 예외처리 필수 //해당 로드할 파일 properties -> 경로 입력 //서버에 올라가있으.. 2024. 5. 20.
#13-3 / Map클래스배열(Key배열) ArrayList,LinkedList는 key배열 아님Map => key : 데이터값, valueMap-가장 큰단위 , 그 안에 자식 Hashmap,Hashtable,TreeMap (List와 같다고 생각하면 됨)Interface임 ( ArrayList,LinkedList  얘네는 class) - List처럼 엄마만 Interface,하위는 class 👀{product=모니터} 이런 형식으로 출력됨int사용 불가 - Integer사용 (List와 동일)중복된 key 사용 불가 Hashmap -> ArrayList -> LinkdedList 로 변환해서 프론트에게 전달! (실무에선 이렇게 사용함) 👀Hashtable : 데이터 병렬처리 및 ThreadHashMap : 단일 처리 및 Single Thre.. 2024. 5. 20.
변수 + 반복문 String aa0 = "a";String aa1 = "b";String aa2 = "c";Object adata[] = {aa0,aa1,aa2};int w=0;while(w  Object 배열을 이용하여 여러개의 배열을 순차적으로 적용하기 위한 방법Integer data1[] = {10,20,30,40,50,60,70,80,90};Integer data2[] = {5,10,15,20,25,30,35,40,45};Integer data3[] = {7,14,21,28,35,42,49,56,63};Object data_all[] = {data1,data2,data3};Integer list[] = (Integer[])data_all[0];int w=0;while(w 2024. 5. 20.
#13-2 / Thread ✅ 웹개발자는 스레드 다룰 일이 크게 없다-> web 개발자가 유일하게 스레드를 활용 하는 경우 : API Server    Javascript에서 멀티 스레드(많이 써봣자 4개) : web worker을 쓰게 되면 멀티 스레드를 사용하게됨⚡ 단일스레드(기존 알던방식)단일스레드 : 순차적으로 실행되기 때문에 위에서 에러나면 아래도 실행안됨public static void main(String[] args) { th1_box th = new th1_box(); th.aaa(); th.bbb(); //대기 int w=0; do { th1_box thb = new th1_box(); thb.ccc(w); //애두 단일스레드 w++; }wh.. 2024. 5. 20.