class Demo{
public static void main(String[] args) {
int x = 10;
method(x);
int[] arr[] = {{1,2,3},{1,2,3}};
method(arr);
System.out.print(x+arr[0] [0]);
}
public static void method(int y) {
y=5;
}
public static void method(int[][] arr) {
arr[0] = new int[]{5,10,15};
}
} |
|