Top Posters
Since Sunday
y
2
m
2
m
2
u
2
m
2
B
2
M
2
e
2
k
2
N
2
y
2
m
2
New Topic  
Oughto Oughto
wrote...
Posts: 742
Rep: 1 0
7 years ago
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) 9
B) 7
C) 1
D) 5
Textbook 
Starting Out with Java: Early Objects

Starting Out with Java: Early Objects


Edition: 4th
Author:
Read 158 times
3 Replies
Replies
Answer verified by a subject expert
ToothyToothy
wrote...
Top Poster
Posts: 744
Rep: 4 0
7 years ago
Sign in or Sign up in seconds to unlock everything for free
More solutions for this book are available here
1

Related Topics

Oughto Author
wrote...
7 years ago
I literally took this as a gen ed course, I was lost thought it would be easy

thx for making it easier on me
wrote...
7 years ago
Cheers dude
New Topic      
Explore
Post your homework questions and get free online help from our incredible volunteers
  562 People Browsing
Related Images
  
 65
  
 144
  
 1390
Your Opinion
Who's your favorite biologist?
Votes: 608

Previous poll results: Where do you get your textbooks?