What will be the output of the following code?

Last Updated :
Discuss
Comments

What will be the output of the following code?

Java
int[] arr = {3, 1, 4, 1, 5, 9};
Arrays.sort(arr);
System.out.println(arr[0]);

1

3

4

9

Share your thoughts in the comments