A method is a program structure consisting of variables and statements that can receive parameters and may return one value. A method may have local variables and it may use member variables. Method parameters are defined, with their data type, in the method argument list. Methods must have a return type. All the other methods in the Contact applet are void.
Methods have numerous access specifiers and modifiers that are well documented here .
An applet may optionally override the other three methods in order to perform functions at certain times in the lifecycle of the applet as listed in the table below. Is closed by browser or the browser is shut down. This print statement illustrates the sequence of events as initiated by the browser. The output from these print statements is written into the Java console. The Java console is just a file on your computer.