Here you can find the source of startsWith(String[] target, String[] with)
public static boolean startsWith(String[] target, String[] with)
//package com.java2s; //License from project: LGPL public class Main { public static boolean startsWith(String[] target, String[] with) { if (with.length > target.length) return false; for (int i = 0; i < with.length; i++) if (!with[i].equals(target[i])) return false; return true; }/*from w ww. j av a 2 s . co m*/ }