Solved

What Will Be Displayed After the Following Statements Are Executed

Question 31

Multiple Choice

What will be displayed after the following statements are executed?
String str = "red$green&blue#orange";
String[] tokens = str.split("[$&#]") ;
For (String s : tokens)
System.out.print(s + " ") ;


A) red green blue orange
B) Red $ green & blue # orange
C) $ & #
D) red [$&#] green [$&#] blue [$&#] orange

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions