Write a program that creates two ArrayListsone to hold Strings and one to hold Integers. Prompt the

Question:

Write a program that creates two ArrayLists—one to hold Strings and one to hold Integers. Prompt the user for a word, and while the user does not enter a sentinel value, continue to add each entered word to the ArrayList, sort the list, pass the list to a display() method, and prompt for another word. After the user enters the sentinel value, prompt the user for an integer. While the user does not enter the sentinel value, continue to add each entered Integer to the ArrayList, sort the list, pass the list to the same display() method, and then prompt the user for another Integer. Save the program as DisplaySortedLists.java.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Java Programming

ISBN: 9780357673423

10th Edition

Authors: Joyce Farrell

Question Posted: