STATIC keyword of Java in AS400

560 pts.
Tags:
AS/400
iseries v5r4
Java
STATIC keyword
When we say a variable is STATIC in a Java program in the AS400, does it mean that every user session that access the class access the same variable (storage location in memory)?

Software/Hardware used:
V5E4

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 4  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • bogeybetsy
    Sorry, the hardware used is AS400 V5R4.
    560 pointsBadges:
    report
  • TomLiotta
    You have asked a surprisingly tricky question. I'm looking into a way to be certain. Since the most common use is as a constant value, it usually doesn't make much difference. But you have a specific side-effect in mind that is generally implementation-dependent. If I can prove one way or the other for V5R4, I'll see about V6R1, too. This might take a day or two if I can get a proper setup going. Tom
    125,585 pointsBadges:
    report
  • philpl1jb
    Tom Constants would be a final static. Phil
    49,960 pointsBadges:
    report
  • bogeybetsy
    Hi Tom and Philip, If it were not in the AS400, the answer would be yes because that's what I read in Java books. But when in the IBM i, I am just not sure. In RPGLE, the static keyword (at least for V5R4) would mean, all programs running in the same job would be accessing the same memory location. But Java in IBM i? Well... Also, I am not planning on using it for constants. I can use that to see how many users are accessing a certain application. This is a side project I am doing nn my own time for the company I work for. I am studying Java to augment my skills as a programmer and what better way than to create some utility which I think would be useful to the company. I'm beginning to think Java in the IBM i side has limited potential... Those who disagree, please enlighten me. Thanks!
    560 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following