Discussion Forum : Strings
Question - 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);
}
}
Options:
A .  abc
B .  123
C .  Runtime exception thrown
D .  Compilation error
Answer: Option A

Submit Your Solution Below and Earn Points !
Next Question
Submit Your Solution hear:

Your email address will not be published. Required fields are marked *