Top Posters
Since Sunday
a
5
k
5
c
5
B
5
l
5
C
4
s
4
a
4
t
4
i
4
r
4
r
4
New Topic  
BenAff BenAff
wrote...
Posts: 439
Rep: 3 0
3 years ago
Analyze the following code:

int i = 3434; double d = 3434;
System.out.printf("%5.1f %5.1f", i, d);


▸ The code compiles and runs fine to display 3434 3434.0.

▸ The code compiles and runs fine to display 3434.0 3434.0.

▸ i is an integer, but the format specifier %5.1f specifies a format for double value. The code has an error.
Textbook 
Introduction to Java Programming, Comprehensive Version

Introduction to Java Programming, Comprehensive Version


Edition: 10th
Author:
Read 488 times
2 Replies
Replies
Answer verified by a subject expert
NashuaNashua
wrote...
Posts: 380
3 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

wrote...
3 years ago
Thanks
New Topic      
Explore
Post your homework questions and get free online help from our incredible volunteers
  1717 People Browsing
 128 Signed Up Today
Related Images
  
 936
  
 304
  
 1642
Your Opinion
Who's your favorite biologist?
Votes: 586

Previous poll results: What's your favorite coffee beverage?