Solved

For the Following Code, How Many Times Would the for Loop

Question 40

Multiple Choice

For the following code, how many times would the for loop execute?
String str = ("Ben and Jerry's ice cream is great.") ;
String[] tokens = str.split(" ") ;
For (String s : tokens)
System.out.println(s) ;


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

Correct Answer:

verifed

Verified

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

Related Questions