This will solve the print problem

The problem that you have with the java code not running.