Example: GetMethod method

This script gets the "toString" method from the java.lang.Integer class that requires an Integer argument, and returns a string.

Dim mySession As JavaSession
Dim myClass As JavaClass
Dim myMethod As JavaMethod
Dim Count As Integer

Set mySession = New JavaSession()

' Get Java "java.lang.Integer" class
Set myClass = mySession.GetClass("java/lang/Integer")

' Get the toString method which
' takes an Integer and returns a string
Set myMethod = _

print {Data type of toString
		return value is a }  _
		& TypeName(myMethod.invoke(,5))
print {result of invoking the method
		with a value of 5 is } _
		& myMethod.invoke(,5)