Driver method to test above method
public static void main ( String [ ] args ) { int set1 [ ] = { 10 , 5 , 3 , 4 , 6 } ; int set2 [ ] = { 8 , 7 , 9 , 3 } ; if ( areDisjoint ( set1 , set2 ) ) System . out . println ( " Yes " ) ; else System . out . println ( " No " ) ; } }