Page 1 of 1

Java Question 1: Question 2:

Posted: Tue Jul 12, 2022 8:21 am
by answerhappygod
Java
Question 1:
Java Question 1 Question 2 1
Java Question 1 Question 2 1 (13.7 KiB) Viewed 20 times
Question 2:
Java Question 1 Question 2 2
Java Question 1 Question 2 2 (14.49 KiB) Viewed 20 times
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