Code compiles but fails to run (works in NetBeans)

Printable View