Driver code to test above
public static void main ( String args [ ] ) { FindCommon ob = new FindCommon ( ) ; int ar1 [ ] = { 1 , 5 , 10 , 20 , 40 , 80 } ; int ar2 [ ] = { 6 , 7 , 20 , 80 , 100 } ; int ar3 [ ] = { 3 , 4 , 15 , 20 , 30 , 70 , 80 , 120 } ; System . out . print ( " Common ▁ elements ▁ are ▁ " ) ; ob . findCommon ( ar1 , ar2 , ar3 ) ; } }