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

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: 899604
Joined: Mon Aug 02, 2021 8:13 am

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

Post by answerhappygod »

1 The Output Of The Line 3 Import Java Util Public Class Arraylistexam Public Static Void Main String Args 1
1 The Output Of The Line 3 Import Java Util Public Class Arraylistexam Public Static Void Main String Args 1 (34.95 KiB) Viewed 76 times
1. The output of the // line 3 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); I/ Line1 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 } }
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply