10번
-
[Java] 명품 자바 프로그래밍(Java Programming) 7장 실습문제 10번 Java / CSECSE/Java 2015. 6. 13. 11:08
Location.java 12345678910111213141516171819202122232425262728293031323334353637383940 package chap6; public class Location { private String lname; private double latitude, longitude; public Location(String lname, double latitude, double longitude) { super(); this.lname = lname; this.latitude = latitude; this.longitude = longitude; } public String getLname() { return lname; } public void setLname..
-
[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..