String calculator on Java