Solved

In the Following Code, How Many Times Will the for Loop

Question 4

Multiple Choice

In the following code, how many times will the for loop execute?
String str = "1,2,3,4,5,6,7,8,9") ;
String[ ] tokens = str.split(",") ;
For (String s : tokens)
System.out.println(s) ;


A) 1
B) 5
C) 7
D) 9

Correct Answer:

verifed

Verified

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

Related Questions