분류 전체보기254 JAVA 자바 HashMap ("지역번호","지역") package edu.collection; import java.util.HashMap; public class CollectionEx4 { public static void main(String[] args) { HashMap tel = new HashMap(); tel.put("052", "울산"); tel.put("051", "부산"); tel.put("02", "서울"); tel.put("052", "울산2"); // HashMap의 경우, 나중에 온 값이 덮어씌워 짐. System.out.println(tel.get("051")); System.out.println(tel.get("052")); System.out.println(tel.get("02")); } } 2018. 2. 9. [JAVA] 자바 부분집합, 교집합, 합집합, 차집합 package edu.collection; import java.util.HashSet; import java.util.Iterator; public class CollectionEx3 { public static void main(String[] args) { HashSet hs1 = new HashSet(); hs1.add("a"); hs1.add("b"); hs1.add("c"); HashSet hs2 = new HashSet(); hs2.add("c"); hs2.add("d"); hs2.add("e"); HashSet hs3 = new HashSet(); hs3.add("a"); hs3.add("b"); // Case_1 부분집합 System.out.println("부분집합"); System.ou.. 2018. 2. 8. JAVA 자바 List, Set 차이 package edu.collection; import java.util.ArrayList; import java.util.HashSet; import java.util.Iterator; public class CollectionEx2 { public static void main(String[] args) { ArrayList al = new ArrayList(); //순차적 al.add("first"); al.add("second"); al.add("third"); al.add("third"); al.remove("third"); al.add("forth"); System.out.println("--ArrayList--"); System.out.println(al); //Iterator 객체를 통해 .. 2018. 2. 8. JAVA 자바 ArrayList, add, size(), get, hashCode package edu.collection; import java.util.ArrayList; public class CollectionEx1 { public static void main(String[] args) { String[] arr = new String[2]; arr[0] = "apple"; arr[1] = "orange"; //arr[2] = "melon"; for(int i=0; i 2018. 2. 8. JAVA 자바 빵 주문/생산일자/유통기한 import java.util.Arrays; import java.util.Calendar; public class Bakery2 { static final int SUM = 100; static String[] bakery = new String[SUM]; static final String BREAD_1 = "식빵"; static final String BREAD_2 = "소보로"; static final String BREAD_3 = "크림빵"; static final String BREAD_4 = "팥빵"; static int cnt_1=0,cnt_2=0,cnt_3=0,cnt_4=0; public static void main(String[] args) { //100개 빵 생산 makeBakery.. 2018. 2. 8. JAVA 자바 빵/랜덤/시간/count import java.text.SimpleDateFormat; import java.util.Date; import java.util.Calendar; import java.text.DateFormat; public class Bakery { public static void main(String[] args) { int a=0,b=0,c=0,d=0; int n; String str=null; int[] Array = new int[100]; for(int i=0; i 2018. 2. 8. HTML / CSS / HTML CSS CSSJavaScriptHTML 2017. 7. 23. Buck Boost Flyback 1. Buck 2.Buck-Boost 2017. 6. 10. Transformer Secondary 코일을 더 많이 감으면 전압을 높아지지만 전류는 떨어지고,코일을 적게 감으면 전압은 떨어지지만 전류는 많이 흐르게 되는 것감는 방향에 따라 극성이 결정되어서 반대로 감으면 입력이 +일 때 출력은 -가 되니까 주의 2017. 6. 10. 이전 1 ··· 25 26 27 28 29 다음