Implemented putChar method