1class array{
2 public static void main(String[] args){
3 int arr[] = {1,2,3,4};
4 System.out.println("Before update" + arr[2]);
5 arr[2] = 9;//updating the value
6 System.out.println("After update" + arr[2]);
7 }
8}
9
1class array{
2 public static void main(String[] args){
3 int arr[] = {1,2,3,8};
4 System.out.println("Before update" + arr[2]);
5 arr[2] = 9;//updating the value
6 System.out.println("After update" + arr[2]);
7 }
8}
9
1class array{
2 public static void main(String[] args){
3 int arr[] = {1,2,3,4};
4 System.out.println("Before update" + arr[2]);
5 arr[2] = 9;//updating the value
6 System.out.println("After update" + arr[2]);
7 }
8}
9
1class array{
2 public static void main(String[] args){
3 int arr[] = {1,2,3,4};
4 System.out.println("Before update" + arr[2]);
5 arr[2] = 9;//updating the value
6 System.out.println("After update" + arr[2]);
7 }
8}
9
1class array{
2 public static void main(String[] args){
3 int arr[] = {1,2,3,8};
4 System.out.println("Before update" + arr[2]);
5 arr[2] = 9;//updating the value
6 System.out.println("After update" + arr[2]);
7 }
8}
9