Top Posters
Since Sunday
c
5
j
5
a
5
L
5
f
5
j
5
D
4
k
4
y
4
t
4
h
4
l
4
New Topic  
jmoney5 jmoney5
wrote...
Posts: 470
4 years ago
Analyze the following statement:

double sum = 0;
for (double d = 0; d < 10;) {
d += 0.1;
sum += sum + d;
}


▸ The program runs in an infinite loop because d<10 would always be true.

▸ The program compiles and runs fine.

▸ The program has a compile error because the adjustment is missing in the for loop.

▸ The program has a compile error because the control variable in the for loop cannot be of the double type.
Textbook 
Introduction to Java Programming, Comprehensive Version

Introduction to Java Programming, Comprehensive Version


Edition: 10th
Author:
Read 49 times
1 Reply
Replies
Answer verified by a subject expert
DoggggDogggg
wrote...
Posts: 399
4 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

jmoney5 Author
wrote...

4 years ago
Thanks
wrote...

Yesterday
Helped a lot
wrote...

2 hours ago
I appreciate what you did here, answered it right Smiling Face with Open Mouth
New Topic      
Explore
Post your homework questions and get free online help from our incredible volunteers
  892 People Browsing
Related Images
  
 308
  
 265
  
 461
Your Opinion
Who will win the 2024 president election?
Votes: 8
Closes: November 4