please let me know where does my static reference, static primitive, object reference , object itself and method itself along with class information is stored.
*please let me know who does this memory management?
*please let me know what gets stored in permgen place?
*please specify the storage space(heap or stack) which will be allocated for all the object references,object, primitive data (for both static and non-static types) for the following program.
package training;
public class Memory {
static int var =1;
static String s="hi";
static Threadtutorial th;// this is another class in the same project,consider this an object.
static Threadtutorial tt = new Threadtutorial();
int are =2;
int d;
static float value;
public static void main(String[] args) {
// TODO Auto-generated method stub
int a;
int b=1;
Threadtutorial th;// this is another class in the nsame project,consider this an object.
Threadtutorial tt = new Threadtutorial();
final int var =1;
value=8;
}
void somemethod(){
int ne=3;
String something;
Object ref;
Object dereee= new Object();
}
static void another(int b){
int c=b;
Object ref2;
Object der= new Object();
}
}