|
"Walden H. Leverich" wrote: > > >Add key word STATIC will make it compile with input parameter: > > Um, don't you need to make the method in Java static too? > Yes. If you only add STATIC in the RPG program, the program would compile but it would fail at runtime with a MethodNotFound exception. It does look like it could easily be a static method, since it doesn't seem to use any instance variables. Chad, Walden is right that when you have an instance method, you have to pass the instance variable as the first parameter. If you would code this in Java: myObj.myMethod(5); Then you would code this in RPG: myMethod(myObj : 5); But you don't code the instance parameter in the RPG prototype for the method; the RPG prototype defines the method with the saem parameters as the Java method does.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.