Top Posters
Since Sunday
A
6
j
6
c
5
m
5
C
5
d
5
s
5
n
4
i
4
d
4
d
4
J
4
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 69 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
Thanks for your help!!
wrote...

Yesterday
Good timing, thanks!
wrote...

2 hours ago
Thanks
New Topic      
Explore
Post your homework questions and get free online help from our incredible volunteers
  768 People Browsing
Related Images
  
 9199
  
 277
  
 4093
Your Opinion
What's your favorite math subject?
Votes: 315