Driver code
public static void main ( String [ ] args ) { Job [ ] a = { new Job ( 3 , 10 , 20 ) , new Job ( 1 , 2 , 50 ) , new Job ( 6 , 19 , 100 ) , new Job ( 2 , 100 , 200 ) } ; ArrayList < Job > arr = new ArrayList < > ( Arrays . asList ( a ) ) ; findMaxProfit ( arr ) ; } }