Results 1 to 2 of 2
  1. #1
    bbq is offline Senior Member
    Join Date
    Jun 2007
    Rep Power

    Default Help with static variables

    I'm developing a web application using Tomcat 4.1 on windows XP.

    On login I calculate the path of my application using

    and store this value in a static variable of a class.

    Now I want to know whether this value will be set throughout the session


  2. #2
    Revelation is offline Member
    Join Date
    Jun 2007
    Rep Power


    why is it that everything you ask sounds like its coming from text book questions?

    And I would say that value will remain throughout the session unless it loses scope. So if it has global scope to the class its gonna stay resident. If it has functional scope, its only going to be resident during the execution of that function.

Similar Threads

  1. accessing instance variables from static methods
    By ravian in forum New To Java
    Replies: 7
    Last Post: 03-01-2009, 10:09 PM
  2. Using Static Variables
    By Java Tip in forum java.lang
    Replies: 0
    Last Post: 04-16-2008, 11:08 PM
  3. Local Variables for a static method - thread safe?
    By mikeg1z in forum Advanced Java
    Replies: 1
    Last Post: 11-16-2007, 01:06 AM
  4. significance of static variables and methods
    By imran_khan in forum New To Java
    Replies: 4
    Last Post: 08-02-2007, 09:52 AM
  5. Replies: 1
    Last Post: 08-01-2007, 09:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts