Action Statement
g.drawstring(“Welcome to Java!”,25,25);
- “g.” refers to the parameter named “g”
- “drawstring” refers to a method defined in objects of class Graphics.
- “(“ indicates the start of the parameter list sent to the method “g.drawstring”
Three parameters (pieces of information) are sent to the method.
- “Welcome to Java!” is a string literal.
- “25,25” are the x and y coordinates of where the string should be placed.
- “)“ indicates the end of the parameter list sent to the method “g.drawstring”
- “;” indicates the end of the statement.