Top Posters
Since Sunday
I
3
p
2
w
2
y
2
J
2
Q
2
r
2
o
2
e
2
j
2
d
2
T
2
New Topic  
meikunn2565 meikunn2565
wrote...
Posts: 461
4 years ago
What is the output of the following code?

int[] myList = {1, 2, 3, 4, 5, 6};
for (int i = 1; i < myList.length; i++) {
myList[i - 1] = myList[i];
}

for (int e: myList)
System.out.print(e + " ");


▸ 2 3 4 5 6 6

▸ 6 1 2 3 4 5

▸ 6 2 3 4 5 1

▸ 2 3 4 5 6 1

▸ 1 2 3 4 5 6
Textbook 
Introduction to Java Programming, Comprehensive Version

Introduction to Java Programming, Comprehensive Version


Edition: 10th
Author:
Read 80 times
1 Reply
Replies
Answer verified by a subject expert
Strategyboyz21Strategyboyz21
wrote...
Posts: 370
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

meikunn2565 Author
wrote...

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

Yesterday
Helped a lot
wrote...

2 hours ago
Brilliant
New Topic      
Explore
Post your homework questions and get free online help from our incredible volunteers
  1817 People Browsing
 121 Signed Up Today
Related Images
  
 283
  
 189
  
 1633
Your Opinion
Which of the following is the best resource to supplement your studies:
Votes: 374