즐거운프로그래밍

[자바] 노트패드++ JVM Memory 영역 (Stack Area, heap Area 구분)

수수께끼 고양이 2023. 10. 12. 09:51
728x90
반응형

1. JVM Memory 영역 (Stack Area, heap Area 구분)

public class HelloJava {
	public static void main(String args[]) {
		System.out.println("hello Java!");
		int i /*stack*/ =3;
		Student s1 /*stack*/ = new Student(); /*heap*/ // |_S_|
		int nums /*stack*/ [] = new int[5]; /*heap*/ // 4 Bit*5=20
	}
}

 

 

728x90
반응형