#459 Console Application with Bubble Sort
Create a console application with the following functionality:
- Prompt for the array size with the message "enter array size:";
- Initialize an integer array of the specified size with random values;
- Print the array with the heading "initialized array:";
- Sort the array in ascending order using bubble sort;
- Print the array with the heading "sorted array:".
The code must follow the Single Responsibility Principle.
Required:
- Clarify the requirements if necessary;
- Estimate the exercise completion time;
- Write and demonstrate the code.
Question review
Sign in to start the dialogue
The mentor keeps the context of the current question and your previous messages.
Sign in
Available with Premium
This is just one of the solutions available with Premium. And more:
- 250+ advanced lectures
- 1300+ practice exercises
- 500+ solutions to problems from real interviews
- Personalized Java Hub certificates
- Expanded access to the AI mentor