[Pljava-dev] static variables

From: olarte(dot)andres at gmail(dot)com (Andres Olarte)
To:
Subject: [Pljava-dev] static variables
Date: 2007-03-12 22:52:00
Message-ID: 3fccaa690703121552n381de9c6qf922fc58face9bb5@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pljava-dev

I've been starting to use pljava and find it very useful, but there's
something I want to know if it's possible. I want to have a static
variable that I can set and retrieve during a session. Something like
this:

public static String x;

public static String test() {
if (x==null) {
return "";
}
return x;
}

public static String testString(String me) {
x=me;
return me;
}

This is a trivial example, but what I want to do on the long run is to
setup a XML parser once (per session) and to avoid the overhead for
each calling of the function. Is it possible?

Thanks a lot,

Andres

Responses

Browse pljava-dev by date

  From Date Subject
Next Message Peter Henderson 2007-03-13 07:44:28 [Pljava-dev] static variables
Previous Message sami jan 2007-03-12 22:15:04 [Pljava-dev] installing pl/Java on Windows