A simple beginner-friendly Java console application that:
- Calculates sum, average, minimum, and maximum of entered numbers
- Sorts the numbers
- Allows repeated number searches
- Supports entering a new dataset
Compile and run Main.java
in your preferred Java IDE or from the terminal.
- Input validation for integers only
- Works in a loop until the user chooses to exit
- Simple and readable code for Java beginners
- Java SE
- Java Arrays utility class (
java.util.Arrays
)
Input:
5 19 20 40 23
Output:
Sum: 107
Average: 21.4
Minimum: 5
Maximum: 40
Sorted: [5, 19, 20, 23, 40]