Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

  1. Set (toggle) a breakpoint. Run to the breakpoint.
  2. Demostrate the debug toolbar that opens in Eclispe at the top left.
    1. Step Into
    2. Step Over
    3. Step Return
    4. Drop To Frame
    5. Resume (to second breakpoint)
    6. Skip All Breakpoints
  3. Demostrate the debug windows that open on the right.
    1. Variables
    2. Breakpoints
    3. 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:

  1. Create a new empty ArrayList of String type called testList
  2. Print the current size of testList.
  3. Add at least 5 elements to testList.
  4. Print testList. ArrayList has a toString method so its easy to print.
  5. Using get(0), print the first element of testList.
  6. Print the last element of testList. This time, do no use a constant to get the last element, use testList. Size().
  7. Use a for loop to print each element of testList.
  8. Use a for-each loop to print each element of testList.
  9. Use Collections.sort(testList) to sort your ArrayList.
  10. 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.
  11. 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Pro SQL Server Wait Statistics

Authors: Enrico Van De Laar

1st Edition

1484211391, 9781484211397

More Books

Students also viewed these Databases questions

Question

What does Processing of an OLAP Cube accomplish?

Answered: 1 week ago