- The Object, o, contains event-specific information.
- In our case, it contains the contents of the TextField when the user pressed enter or return.
- Since the information that o contains depends on the event, it can contain several different kinds of information.
- We want the String representation of o, so we apply the Object class's toString method to it.
- Think of Integer.parseInt as a method that takes a String as an argument, and returns an int as its value.
- (What actually is happening is a little different, to be explained later.)
- Finally, the value of the int is assigned to number, a name that we declared would refer to an int.
- This value remains the value of number until we change it.
- (What hppens if we type something into the TextField other than an integer?)