logo

Crowdly

What will be the output of the program below? import java.util.ArrayList; pub...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

What will be the output of the program below?

import java.util.ArrayList;

public class Quiz2Q2 {

public static void main(String[] args) throws Exception {

ArrayList<Integer> arr = new ArrayList<>(); // 1

arr.add(100); // 2

System.out.println(arr.get(arr.size())); // 3

}

}

100%
0%
0%
0%
More questions like this

Want instant access to all verified answers on ulearn.utp.edu.my?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!