Error in printing method as always it prints the last value

Printable View