Question
Hello I'm having difficulty understanding this problem with my study guide question for my beginner Java class with ArrayList.My final is in a few days
Hello I'm having difficulty understanding this problem with my study guide question for my beginner Java class with ArrayList.My final is in a few days any help quickly would be appreciated. This is the prompt
a Java class of your choice, instantiate several objects of that class, add those object to an ArrayList, and manipulate that list using several methods from the ArrayList class. Create a class of your own selection. It should have at least 2 instance variables, 2 constructors, toString(), and equals(). In a different class, create a main method. In main, instantiate at least 8 objects of the class you created in step 1 above. Add those objects to an ArrayList which uses your class as its base type. Go to the Java API (Application Programming Interface) for ArrayLists and read about the ArrayList class, along with its constructors and methods: https://docs.oracle.com/javase/8/docs/api/java/util/ArrayList.html Along with the set, get, remove, trimToSize, and clear methods, select at least 5 other methods from the API and use them on your ArrayList. Identify the 5 methods in your Introductory Comments and/or in your code. Do not use an iterator. Submit a listing of the class created in step 1 above, a listing of the class containing main.. Make sure that you identify the 5 other methods you used besides those listed in step 6 above.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started