Joseph Bernabe Bagnes

Greenhorn
+ Follow
since Aug 24, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Joseph Bernabe Bagnes

Campbell Ritchie wrote:Welcome to the Ranch



thanks Mr. Ritchie
13 years ago
Hey guys, we have 3 segments in our memory
1. Stack Segment
2. Heap Segment
3. Code Segment

Heap - contains all created objects in runtime, objects only plus their object attributes (instance variables)
Stack - contains local variables and Reference variables(variables that hold the address of an object in the heap)
Code - the segment where the actual compiled Java bytecodes resides when loaded
* Static members (variables or methods) are called class members, meaning they reside where the class(bytecode) resides, which is in the Code Segment.

ANSWER IS: Static members (variables or methods) reside in the Code Segment of the memory.

*Hope it'll clarify things
13 years ago