SlideShare a Scribd company logo
JVM Architecture - Java
.
JVM Architecture - Java
Method Area Heap Area Java Stack’s Area
Jvst
a
b
10
20
main(S args[])
Main
main(S args[])
x 50
class Jvst{
static int a=10;
static int b=20;
public static void main(String arg[]){
int x=50;
System.out.println(" x..."+x);
}
}
class Jvns{
}
int a=10;
int b=20;
void m1(){
Jvns j2=new Jvns();
System.out.println("n j2-a..."+j2.a+" j2-b..."+j2.b);
}
public static void main(String arg[]){
Jvns j1=new Jvns();
System.out.println("n j1-a..."+j1.a+" j1-b..."+j1.b);
j1.m1();
System.out.println("n j1-a..."+j1.a+" j1-b..."+j1.b);
}
Method Area Heap Area
Jvst
a
b
main(S args[])
m1()
Java Stack’s Area
Main
main(S args[])
j1
j2
m1()
1010
2020
1010
2020
0
0
0
0
a
b
a
b
20
10
10
20

More Related Content

What's hot (20)

PDF
ECMAScript 6 major changes
hayato
 
PDF
Mozilla とブラウザゲーム
Noritada Shimizu
 
PPT
Oop lecture9 13
Shahriar Robbani
 
PDF
Pivorak Clojure by Dmytro Bignyak
Pivorak MeetUp
 
PDF
The Ring programming language version 1.8 book - Part 73 of 202
Mahmoud Samir Fayed
 
PDF
10CSL67 CG LAB PROGRAM 10
Vanishree Arun
 
DOCX
WAP to add two given matrices in Java
One97 Communications Limited
 
PPTX
Groovy puzzlers по русски с Joker 2014
Baruch Sadogursky
 
ODP
Functors, applicatives, monads
rkaippully
 
PPT
DATASTRUCTURES PPTS PREPARED BY M V BRAHMANANDA REDDY
Malikireddy Bramhananda Reddy
 
PDF
Clojure functions midje
Jackson dos Santos Olveira
 
DOCX
Linked list imp of list
Elavarasi K
 
PDF
C++ practical
Rahul juneja
 
PDF
Numerical Methods with Computer Programming
Utsav Patel
 
PDF
10CSL67 CG LAB PROGRAM 8
Vanishree Arun
 
PDF
The Ring programming language version 1.5.3 book - Part 25 of 184
Mahmoud Samir Fayed
 
PDF
JavaScript - Agora nervoso
Luis Vendrame
 
DOC
Ds 2 cycle
Chaitanya Kn
 
PDF
2019-10-05 - Untangled - Voxxed days ticino
Arnaud Bos
 
ECMAScript 6 major changes
hayato
 
Mozilla とブラウザゲーム
Noritada Shimizu
 
Oop lecture9 13
Shahriar Robbani
 
Pivorak Clojure by Dmytro Bignyak
Pivorak MeetUp
 
The Ring programming language version 1.8 book - Part 73 of 202
Mahmoud Samir Fayed
 
10CSL67 CG LAB PROGRAM 10
Vanishree Arun
 
WAP to add two given matrices in Java
One97 Communications Limited
 
Groovy puzzlers по русски с Joker 2014
Baruch Sadogursky
 
Functors, applicatives, monads
rkaippully
 
DATASTRUCTURES PPTS PREPARED BY M V BRAHMANANDA REDDY
Malikireddy Bramhananda Reddy
 
Clojure functions midje
Jackson dos Santos Olveira
 
Linked list imp of list
Elavarasi K
 
C++ practical
Rahul juneja
 
Numerical Methods with Computer Programming
Utsav Patel
 
10CSL67 CG LAB PROGRAM 8
Vanishree Arun
 
The Ring programming language version 1.5.3 book - Part 25 of 184
Mahmoud Samir Fayed
 
JavaScript - Agora nervoso
Luis Vendrame
 
Ds 2 cycle
Chaitanya Kn
 
2019-10-05 - Untangled - Voxxed days ticino
Arnaud Bos
 

JVM Architecture - Java

  • 2. .
  • 4. Method Area Heap Area Java Stack’s Area Jvst a b 10 20 main(S args[]) Main main(S args[]) x 50 class Jvst{ static int a=10; static int b=20; public static void main(String arg[]){ int x=50; System.out.println(" x..."+x); } }
  • 5. class Jvns{ } int a=10; int b=20; void m1(){ Jvns j2=new Jvns(); System.out.println("n j2-a..."+j2.a+" j2-b..."+j2.b); } public static void main(String arg[]){ Jvns j1=new Jvns(); System.out.println("n j1-a..."+j1.a+" j1-b..."+j1.b); j1.m1(); System.out.println("n j1-a..."+j1.a+" j1-b..."+j1.b); }
  • 6. Method Area Heap Area Jvst a b main(S args[]) m1() Java Stack’s Area Main main(S args[]) j1 j2 m1() 1010 2020 1010 2020 0 0 0 0 a b a b 20 10 10 20