Java methods (both instance and static) are either type methods or void methods. In general, type methods return a value with a result type, and void methods perform some action(s) and return nothing.
For example, in the Address class:
The toString( ) method is a type method whose type is String.
The removeLeadingBlanks( ) method is a void method.
The Address constructor method is a type method whose type is the Address class.
You invoke type methods as functions and use the new keyword when invoking a constructor method:
insert into emps values ('Don Green', new Address('234 Stone Road', '99777'), new Address2Line( ) )
select name, home_addr>>toString( ) from emps where home_addr>>toString( ) like ‘%Baker%’
The removeLeadingBlanks( ) method of the Address class is a void instance method that modifies the street and zip fields of a given instance. You can invoke removeLeadingBlanks( ) for the home_addr column of each row of the emps table. For example:
update emps set home_addr = home_addr>>removeLeadingBlanks( )
removeLeadingBlanks( ) removes the leading blanks from the street and zip fields of the home_addr column. The Transact-SQL update statement does not provide a framework or syntax for such an action. It simply replaces column values.