Create a text file called question2.txt and populate it with random characters, numbers, and symbols in a specific pattern. Write a Java program that implements an ArrayList to store the contents of this text file. The program should display the contents of the text file in the console, and then sort the contents according to numeric order. The sorted contents should be displayed in the console again. Note: Numeric order sorting rule is based on the numeric value of elements, such as sorting a list of integers in odd-even order.

icon
Related questions
Question

Create a text file called question2.txt and populate it with random characters, numbers,
and symbols in a specific pattern. Write a Java program that implements an ArrayList
to store the contents of this text file. The program should display the contents of the
text file in the console, and then sort the contents according to numeric order. The
sorted contents should be displayed in the console again.
Note: Numeric order sorting rule is based on the numeric value of elements, such as
sorting a list of integers in odd-even order. 

 

 

Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, data-structures-and-algorithms and related others by exploring similar questions and additional content below.