Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8776969
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T19:11:01+00:00 2026-06-13T19:11:01+00:00

I am bit confused with some implementation,Here is the my problem, Two users can

  • 0

I am bit confused with some implementation,Here is the my problem,

  1. Two users can login to the system.(User A,B)
  2. They login same time with different user names and passwords

We assume, Employee class has a static variable call age

User A change the age value to 45, after that user B change the age value to 28, then both save the changes.

so what would be the real values of A and B?

Thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T19:11:03+00:00Added an answer on June 13, 2026 at 7:11 pm

    Well, first of all, “age” should be an instance variable, not static – a static variable is shared by all the instances of a class.

    In the example you gave, the last set value is the one “which sticks”, assuming you are working in a non clustered environment (ie, shatic variables are shared in classes instantiated in the same virtual machine).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new to java development ! Facing some problem , and bit confused.
alt text http://img693.imageshack.us/img693/724/markov.png I'm a bit confused about some points here: What does it
Evening, I'm a bit confused about why some of my jquery isn't working. Here's
I'm a bit confused. Looking at some existing code here at my university, I
I'm a bit confused over the .net redistributables... Our C# code uses some API
Some of the HTML5 canvas demos are very impressive, but I'm a bit confused.
I've done some looking around, but I'm still confused a bit. I tried Crockford's
Bit confused here, I have an on-demand instance but do I get charged even
After having some readings about Doxygen I'm a bit confused where to document my
A bit confused with wiring controllers, I need some help I create a new

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.