Driver code
public static void main ( String args [ ] ) { Interval arr [ ] = { new Interval ( 2 , 6 ) , new Interval ( 4 , 7 ) } ; int n = arr . length ; int query [ ] = { 5 , 8 } ; int q = query . length ;