Example 3
The Java™ Integer class contains
a method called shortValue, which returns the short representation
of the Integer object used to invoke the method. It is declared in Java as follows:
short shortValue()
This method would be prototyped as follows:
D shortval PR 5I 0 EXTPROC(*JAVA:
D 'java.lang.Integer':
D 'shortValue'
The STATIC keyword is not specified because the method is not a static method. The method takes no parameters, so none are coded. When you call this method, you will specify the Integer instance as the first parameter. The returned value is specified as 5I, which maps to the Java short data type.