public class Test {
public static void main(String[] argv) {
String data = "(999) 999-9999";
StringTokenizer t2 = new StringTokenizer(token, "-");
while (t2.hasMoreTokens()) {
System.out.println(t2.nextToken());
}
}
}
StringTokenizer st = new StringTokenizer(lineStr, " ,\t");
String goodsCode = st.hasMoreTokens() ? (String)st.nextToken().trim() : "*";
String saleDate = st.hasMoreTokens() ? (String)st.nextToken().trim() : "*";
public static void main(String[] argv) {
String data = "(999) 999-9999";
StringTokenizer t2 = new StringTokenizer(token, "-");
while (t2.hasMoreTokens()) {
System.out.println(t2.nextToken());
}
}
}
StringTokenizer st = new StringTokenizer(lineStr, " ,\t");
String goodsCode = st.hasMoreTokens() ? (String)st.nextToken().trim() : "*";
String saleDate = st.hasMoreTokens() ? (String)st.nextToken().trim() : "*";
문자열 자르기에 최강자죠^^