import java.util.Arrays;
public class SortExample
{
public static void main(String[] args)
{
// Our arr contains 8 elements
int[] arr = {10,7,9,5,8,4};
Arrays.sort(arr);
System.out.printf(Arrays.toString(arr));
}
}
a) [4,5,7,8,9,10]
b) [10,9,8,7,5,4]
c) 4,5,7,8,9,10
d) error
What will be the output of the given Java code?
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
What will be the output of the given Java code?
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!