Given:
public class Main { public static void main(String[] args) { String in = "1 a2 b 3 c4d 5e"; String[] chunks = in.split(args[0]); System.out.println("count " + chunks.length); for(String s : chunks) System.out.print(">" + s + "< "); }/* w w w . j a v a 2 s . c om*/ }
And two invocations:
java Main " " java Main "\d"
What is the result? (Choose all that apply.)
B is correct.
In the second case, the first token is empty.
In the first case, the delimiter is a space.
In the second case, the delimiter is any numeric digit.