Page 1 of 1

1. The output of the // line 2 import java.util.*; public class ArrayListExam{ public static void main(String[] args) {

Posted: Sat May 14, 2022 3:16 pm
by answerhappygod
1 The Output Of The Line 2 Import Java Util Public Class Arraylistexam Public Static Void Main String Args 1
1 The Output Of The Line 2 Import Java Util Public Class Arraylistexam Public Static Void Main String Args 1 (37.48 KiB) Viewed 40 times
1. The output of the // line 2 import java.util.*; public class ArrayListExam{ public static void main(String[] args) { // TODO Auto-generated method stub ArrayList A=new ArrayList(); A.add("Object"); A.add(25); A.add("Oriented"); A.add(30); A.add(2.5); A.add("ADpoly"); A.add(39); System.out.println(A); // Line 1 System.out.println(A.size(); // Line 2 A.remove("Object"); System.out.println(A); // Line 3 System.out.println(A.size(); // Line 4 System.out.println(A.contains("adpoly")); // Line 5 A.clear(); System.out.println(A.size(); // Line 6 } >