Compare whether the sum is equal to n or not , if it is equal to n print the numbers
if ( sum == n ) { for ( Integer i : s ) { System . out . print ( i + " ▁ " ) ; } System . out . println ( ) ; return ; } }