Java Question 1: Question 2:
Posted: Tue Jul 12, 2022 8:21 am
Java
Question 1:
Question 2:
Assume list is type ArrayList<Integer>. What is true about the following code: for (int num list) { } System.out.println(num); O the code will run but crash with a runtime error there is no error there is a compiler error
Assume list is type ArrayList<Integer>. What is true about the following code: for(int i=0; i<-list.size(); i++) { System.out.println(list.get(i)); } the code will run but crash with a runtime error O there is no error O there is a compiler error
Question 1:
Question 2:
Assume list is type ArrayList<Integer>. What is true about the following code: for (int num list) { } System.out.println(num); O the code will run but crash with a runtime error there is no error there is a compiler error
Assume list is type ArrayList<Integer>. What is true about the following code: for(int i=0; i<-list.size(); i++) { System.out.println(list.get(i)); } the code will run but crash with a runtime error O there is no error O there is a compiler error