Solved

For the Following Code,how Many Times Would the While Loop

Question 31

Multiple Choice

For the following code,how many times would the while loop execute? StringTokenizer strToken =
New StringTokenizer("Cars,trucks,and SUVs " +
"are all types of automobiles.") ;
While (strToken.hasMoreTokens() )
{
System.out.println(strToken.nextToken() ) ;
}


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