create and use java objects and classes/* execute on button press */
Local JavaObject &string, &pattern, &matcher;
Local string &CRLF, &msg;

&CRLF = Char(10) | Char(13);
&string = CreateJavaObject("java.lang.String", "Hello World");
&msg = "jString.toString() = " | &string.toString();
&msg = &msg | &CRLF | "jString.indexOf('0') = " | &string.indexOf("o");

&pattern = GetJavaClass("java.util.regex.Pattern").compile("\s");
&matcher = &pattern.matcher(&string);
While &matcher.find()
   &count = &count + 1;
End-While; in peoplecode