Modifying the variable 'output' doesn't actually cause a message to be output to the user via a JOptionPane. You have to write the code that does that. Follow the initial output as an example.