Driver Code
public static void main ( String args [ ] ) throws IOException { int n = 5 ; int [ ] array = { 10 , 3 , 5 , 6 , 2 } ; Solution ob = new Solution ( ) ; long [ ] ans = new long [ n ] ; ans = ob . productExceptSelf ( array , n ) ; for ( int i = 0 ; i < n ; i ++ ) { System . out . print ( ans [ i ] + " ▁ " ) ; } } }