6장
-
[Java] 명품 자바 프로그래밍(Java Programming) 6장 실습문제 12번CSE/Java 2015. 6. 13. 11:05
Person.java 1234567891011121314151617181920212223242526272829303132333435363738394041 package ch06; public class Person { private String name; private int[] arr; public Person(String name) { this.name = name; arr = new int[3]; } public boolean generate() { for (int i = 0; i
-
[Java] 명품 자바 프로그래밍(Java Programming) 6장 실습문제 10번CSE/Java 2015. 6. 13. 11:05
1234567891011121314151617181920212223 package ch06; import java.util.StringTokenizer; public class Practice10 { public static void main(String[] args) { String query = args[0]; StringTokenizer st = new StringTokenizer(query, "&"); String[] arr; String tmp = ""; while (st.hasMoreTokens()) { tmp = st.nextToken(); arr = tmp.split("="); System.out.print(arr[0] + "\t" + arr[1] + "\n"); } }} Colored b..
-
[Java] 명품 자바 프로그래밍(Java Programming) 6장 실습문제 8번CSE/Java 2015. 6. 13. 11:04
12345678910111213141516171819202122232425262728293031 package ch06; import java.util.Scanner;import java.util.StringTokenizer; public class Practice08 { @SuppressWarnings("resource") public static void main(String[] args) { Scanner scan = new Scanner(System.in); String query = scan.nextLine(); StringTokenizer st = new StringTokenizer(query, " "); String maxToken = ""; String tmp = ""; int maxLen..
-
[Java] 명품 자바 프로그래밍(Java Programming) 6장 실습문제 6번CSE/Java 2015. 6. 13. 11:03
12345678910111213141516171819202122232425262728293031323334 package ch06; import java.io.IOException;import java.io.InputStreamReader; public class Practice06 { public static void main(String[] args) { InputStreamReader rd = new InputStreamReader(System.in); int c = 0; int count = 0; try { while (true) { c = rd.read(); if (65
-
[Java] 명품 자바 프로그래밍(Java Programming) 6장 Open ChallengeCSE/Java 2015. 6. 13. 11:03
OpenChallenge.java 123456789101112131415161718192021222324252627282930313233343536373839404142 import java.io.IOException;import java.io.InputStreamReader; public class OpenChallenge06 { public static void main(String[] args) { InputStreamReader rd = new InputStreamReader(System.in); int[] histgram = new int[26]; int c = 0; try { while (true) { c = rd.read(); for (int i = 0; i