Add a string instance variable, messageUponExiting (a string), to the Window class.

LANGUAGE: Java

CHALLENGE:

Add a string instance variable, messageUponExiting (a string), to the Window class. This variable will be used to display a message when the user closes the window (for example “are you sure you want to quit”). Furthermore, this variable should be accessible to all subclasses of the Window class (as each sort of window may require a different message upon exiting).
Please provide the declaration of the instance variable only– nothing else.

SOLUTION:

protected String messageUponExiting;