A

Admin • 828.03K Points
Coach

Q. What will be the output?
public class Test{
public static void main (String[] args){
String test = "a1b2c3";
String[] tokens = test.split("\d");
for(String s: tokens)
System.out.print(s);
}
}

  • (A) abc
  • (B) 123
  • (C) Runtime exception thrown
  • (D) Compilation error
  • Correct Answer - Option(A)
  • Views: 18
  • Filed under category Java
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.