static void swap(int a, int b) {
int tmp = a;
b = a;
a = tmp;
}

public static void main(String[] args) {
int a = 5;
int b = 10;
swap(a, b);
System.out.print(a + ", " + b);
}

В результате работы приведенного фрагмента кода будет выведено ...

Select one:
10, 10
не определено
10, 5
5, 10
5, 5
Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Answers & Comments


Copyright © 2024 SCHOLAR.TIPS - All rights reserved.