where are statics variables stored

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rashmiharitas
    New Member
    • Apr 2008
    • 6

    where are statics variables stored

    where are statics variables stored?

    static variables and static methods can be used without creation of objects
    so in which part of memory is static stored
    plz help me
  • hsn
    New Member
    • Sep 2007
    • 237

    #2
    i have never thought of it. it is a good question.
    i will search about it.
    why don't you do the same thing.

    thanks for the question
    hsn

    Comment

    • rashmiharitas
      New Member
      • Apr 2008
      • 6

      #3
      Originally posted by hsn
      i have never thought of it. it is a good question.
      i will search about it.
      why don't you do the same thing.

      thanks for the question
      hsn



      i am trying hard to find it but not getting
      please let me know if you find it

      Comment

      • sukatoa
        Contributor
        • Nov 2007
        • 539

        #4
        Originally posted by rashmiharitas
        where are statics variables stored?

        static variables and static methods can be used without creation of objects
        so in which part of memory is static stored
        plz help me
        I am confused about your question....

        What is the purpose of knowing this?

        Is this your assignment? :)

        maybe this
        could help you out....

        sukatoa...

        Comment

        • BigDaddyLH
          Recognized Expert Top Contributor
          • Dec 2007
          • 1216

          #5
          Does it matter where they're stored? The semantics should be enough, right?

          Comment

          • hsn
            New Member
            • Sep 2007
            • 237

            #6
            it wont hert if we learc where these data are sstored.
            we will understand more.........


            hsn

            Comment

            • rashmiharitas
              New Member
              • Apr 2008
              • 6

              #7
              statics are stored on heap precisely on special part of heap called
              " permanent generation "

              Comment

              • rashmiharitas
                New Member
                • Apr 2008
                • 6

                #8
                Originally posted by sukatoa
                I am confused about your question....

                What is the purpose of knowing this?

                Is this your assignment? :)

                maybe this
                could help you out....

                sukatoa...


                Static variables are stored on the heap precisely on a special part of heap called "permanent generation"

                Comment

                • BigDaddyLH
                  Recognized Expert Top Contributor
                  • Dec 2007
                  • 1216

                  #9
                  Originally posted by hsn
                  it wont hert if we learc where these data are sstored.
                  we will understand more.........


                  hsn
                  I suppose if you learn that static variables are stored in location "X' then by definition you've learned more. But what if later you learn that static variables are actually stored in a different location "Y"? Deep understanding comes from reasoning from semantics, not from implementation details.

                  Comment

                  Working...