Here you can find the source of tokenizeDate(String date)
public static int[] tokenizeDate(String date)
//package com.java2s; import java.util.ArrayList; import java.util.StringTokenizer; public class Main { public static int[] tokenizeDate(String date) { StringTokenizer st = new StringTokenizer(date, "-/"); ArrayList<Integer> al = new ArrayList<Integer>(); while (st.hasMoreTokens()) { al.add(Integer.parseInt(st.nextToken())); }/*from www . j av a 2s .com*/ int[] tokenList = new int[3]; for (int i = 0; i < al.size(); i++) { tokenList[i] = al.get(i); } return tokenList; } }