ILE RPG Programmer's Guide


Example 4

The Java™ Integer class contains a method called equals, which accepts an Object as parameter and returns a boolean. It is declared in Java as follows:

boolean equals(Object)

This method would be prototyped as follows:

D equals          PR              N   EXTPROC(*JAVA:
D                                      'java.lang.Integer':
D                                      'equals')
D  obj                            O   CLASS(*JAVA:'java.lang.Object')

The returned value is specified as N, which maps to the Java boolean data type. Because this is not a static method, a call to this method will have two parameters with the instance parameter coded first.


[ Top of Page | Previous Page | Next Page | Contents | Index ]