java.util.StringTokenizer.nextElement() 方法


java.util.StringTokenizer.nextElement() 方法

package com.codingdict;

import java.util.*;

public class StringTokenizerDemo {
   public static void main(String[] args) {

      // creating string tokenizer
      StringTokenizer st = new StringTokenizer("Come to learn");

      // moving to next element
      st.nextElement();

      // checking next to next element
      System.out.println("Next element is : " + st.nextElement());
   }    
}