Top Posters
Since Sunday
5
k
4
c
4
4
M
3
t
3
i
3
B
3
k
3
m
3
c
3
o
3
New Topic  
barmour44 barmour44
wrote...
Posts: 420
4 years ago
What is the output of the following code?

public class Test {
public static void main(String[] args) {
int[] x = {120, 200, 016};
for (int i = 0; i < x.length; i++)
System.out.print(x[i] + " ");
}
}


▸ 120 200 14

▸ 120 200 16

▸ 120 200 20

▸ 016 is a compile error. It should be written as 16.
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
KaajalpKaajalp
wrote...
Posts: 367
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

barmour44 Author
wrote...

4 years ago
this is exactly what I needed
wrote...

Yesterday
Smart ... Thanks!
wrote...

2 hours ago
This site is awesome
New Topic      
Explore
Post your homework questions and get free online help from our incredible volunteers
  931 People Browsing
Related Images
  
 311
  
 1231
  
 24
Your Opinion
How often do you eat-out per week?
Votes: 80