Top Posters
Since Sunday
L
4
d
4
3
k
3
k
3
j
3
k
3
b
3
f
3
b
3
d
3
h
3
New Topic  
shayeshaye00 shayeshaye00
wrote...
Posts: 506
4 years ago
Show the output of the following code:

public class Test {
public static void main(String[] args) {
int[] x = {1, 2, 3, 4, 5};
increase(x);
int[] y = {1, 2, 3, 4, 5};
increase(y[0]);
System.out.println(x[0] + " " + y[0]);
}

public static void increase(int[] x) {
for (int i = 0; i < x.length; i++)
x[i]++;
}

public static void increase(int y) {
y++;
}
}


▸ 0 0

▸ 1 2

▸ 2 2

▸ 1 1

▸ 2 1
Textbook 
Introduction to Java Programming, Comprehensive Version

Introduction to Java Programming, Comprehensive Version


Edition: 10th
Author:
Read 43 times
1 Reply
Replies
Answer verified by a subject expert
swolfe15swolfe15
wrote...
Posts: 371
4 years ago
Sign in or Sign up in seconds to unlock everything for free
More solutions for this book are available here

Related Topics

shayeshaye00 Author
wrote...

4 years ago
This site is awesome
wrote...

Yesterday
I appreciate what you did here, answered it right Smiling Face with Open Mouth
wrote...

2 hours ago
You make an excellent tutor!
New Topic      
Explore
Post your homework questions and get free online help from our incredible volunteers
  1115 People Browsing
Related Images
  
 1028
  
 1309
  
 2784
Your Opinion
Who's your favorite biologist?
Votes: 587