There is an error in the code below - what is it? ArrayList mylist = new ArrayList(); for (int i = 0; i

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

There is an error in the code below - what is it? ArrayList mylist = new ArrayList(); for (int i = 0; i

Post by answerhappygod »

There Is An Error In The Code Below What Is It Arraylist String Mylist New Arraylist String For Int I 0 I 1
There Is An Error In The Code Below What Is It Arraylist String Mylist New Arraylist String For Int I 0 I 1 (59.7 KiB) Viewed 12 times
There is an error in the code below - what is it? ArrayList<String> mylist = new ArrayList<String>(); for (int i = 0; i < mylist.size(); i++) System.out.print(mylist); Select one OA. The array list is empty, the loop will cause an out-of-range error OB. Array list doesn't have a size() method. It uses the length property instead OC Array list doesn't use the [] operator D. Array lists cannot contain String objects
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply