Can you post the program's output, explain what is wrong with it and show what the output should be?

Add some printlns so the results are on the console where they can be copied.