Sort 3 numbers | Java program to sort an array of size 3
import java . io . * ; import java . util . * ; class GFG { public static void main ( String [ ] args ) { int a [ ] = { 10 , 12 , 5 } ; Arrays . sort ( a ) ; for ( int i = 0 ; i < 3 ; i ++ ) System . out . print ( a [ i ] + " ▁ " ) ; } }