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.
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.
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
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps
Knowledge Booster
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.