Declaration of array of structure
Pair p [ ] = new Pair [ 5 ] ; p [ 0 ] = new Pair ( 5 , 24 ) ; p [ 1 ] = new Pair ( 39 , 60 ) ; p [ 2 ] = new Pair ( 15 , 28 ) ; p [ 3 ] = new Pair ( 27 , 40 ) ; p [ 4 ] = new Pair ( 50 , 90 ) ; int n = p . length ;