Run ❯
Get your
own Java
server
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
import java.util.Arrays; public class Main { public static void main(String[] args) { int[] myNum = {50, 10, 25, 1, 17, 99, 33}; // This will only sort the integers 10, 25, 1 and 17 from the myNum array Arrays.sort(myNum, 1, 4); for (int i : myNum) { System.out.println(i); } } }
50
1
10
25
17
99
33