Print the constructed array
System . out . print ( " { " ) ; for ( int i = 0 ; i < answer . length ; i ++ ) { if ( i == answer . length - 1 ) System . out . print ( answer [ i ] + " } " ) ; else System . out . print ( answer [ i ] + " , ▁ " ) ; } }