Question
Eclipse Debugger Program 6 Use the previous ArrayList assignment to demostrate the Eclipse debugger. If you havent completed that assignment, you can use another previous
Eclipse Debugger Program 6
Use the previous ArrayList assignment to demostrate the Eclipse debugger. If you havent completed that assignment, you can use another previous assignment. The demostration project must have at least one method other than main.
Requirements
- Set (toggle) a breakpoint. Run to the breakpoint.
- Demostrate the debug toolbar that opens in Eclispe at the top left.
- Step Into
- Step Over
- Step Return
- Drop To Frame
- Resume (to second breakpoint)
- Skip All Breakpoints
- Demostrate the debug windows that open on the right.
- Variables
- Breakpoints
- Expressions
Exercise Program 5
Provide links to videos for all exercises.
Array List
The ArrayList class creates an array that can resize on demand. Once you learn about ArrayList, there is little reason to use arrays. The container allocates more memory automatically as more elements are added.
Requirments and Rubric
Write a test program that does the following:
- Create a new empty ArrayList of String type called testList
- Print the current size of testList.
- Add at least 5 elements to testList.
- Print testList. ArrayList has a toString method so its easy to print.
- Using get(0), print the first element of testList.
- Print the last element of testList. This time, do no use a constant to get the last element, use testList. Size().
- Use a for loop to print each element of testList.
- Use a for-each loop to print each element of testList.
- Use Collections.sort(testList) to sort your ArrayList.
- Use the testList.remove(0) method to remove the first element of the list. remove(0). Put this call inside a println statement so you can observe the return value. Print testList.
- Use the remove method to remove a specific string by its string value. Put this call inside a println statement so you can observe the return value. Print testList.
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