-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHackerEarth.java
39 lines (33 loc) · 926 Bytes
/
HackerEarth.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import java.util.Scanner;
public class HackerEarth {
public static void swap(Integer i, Integer j) {
Integer temp = new Integer(i);
i = j;
j = temp;
}
public static void main(String[] args) {
// Scanner sc = new Scanner(System.in);
// // n
// int row = Integer.parseInt(sc.nextLine());
// int col = Integer.parseInt(sc.nextLine());
// int arr[][] = new int[row][col];
// for (int i = 0; i < row; i++) {
// for (int j = 0; j < col; j++) {
// arr[i][j] = sc.nextInt();
// }
// }
// System.out.println();
// System.out.println(row);
// System.out.println(col);
// for (int i = 0; i < row; i++) {
// for (int j = 0; j < col; j++) {
// System.out.print(arr[i][j] + " ");
// }
// System.out.println();
// }
Ingeger i = new Ingeger(10);
Ingeger j = new Ingeger(20);
swap(i, j);
System.out.println(i + " " + j);
}
}