StringTokenizer的方法主要有下列幾個
countTokens():可以知道你的String被Tokenizer分成幾段
hasMoreTokens():檢查StringTokenizer是否還有Token
nextToken():將StringTokenizer的下一個Token用String表示
以下是簡單的範例:
import java.util.StringTokenizer; public class StringDemo { public static void main(String[] args) { String demo = "String,int,long,double"; StringTokenizer st = new StringTokenizer(demo,","); System.out.println("st has "+st.countTokens()+"tokens"); while(st.hasMoreTokens()){ System.out.println(); } } }
Merkur 20C - Merkur 20C Safety Razor - Deccasino
回覆刪除Merkur 바카라사이트 20C is a chrome finished, 메리트카지노 very compact safety razor. Merkur 20C has the same great quality as the Merkur 20C, งานออนไลน์ as its handle is longer and longer.