3. Statements : OpenROAD Language Statements : Method Invocation Statement
 
Share this page                  
Method Invocation Statement
This statement invokes a method that is defined on a class of a reference variable.
This statement has the following syntax:
[returnvariable =] referencevariable.method(parameterlist);
The method invocation statement calls a method defined for the class of a reference variable. This statement is used for methods of user classes, system classes, and external classes.
You can invoke any method defined for the class of the reference variable or any inherited method from the variable's superclasses. User classes can invoke any method defined for the Object class, because this system class is the superclass for all user classes.
The parameters for a user class or system class method can be optional, and you can specify them in any order. The parameter names are dynamic names and can be specified at runtime. See the description of the specific method for the default behavior for the parameters. You must include the parentheses even if no parameters are included.
Note:  You can also invoke a method as part of an expression.