메모리 스택 힙


public static void main() {
int a=10; // 이 중괄호 안에서만 a=10임.
}
package com.human.ex;
public class test1 {
static int a= 22; // 지역변수를 기술 한 곳 말고는 적용가능 우선순위는 지역변수 > 전역변수
.
.
.
.
}
//1. Human 클래스 정의
public class Human{
public String name;
public in age;
public double height;
}
//2. 클래스 변수 선언
Human h=new Human();
Human h2=new Human();
Human h=new Human(); 과 같이 Human클래스가 할당되어 h에 주소가 들어간 클래스 변수를 인스턴스라 한다.
99pg 복습,실습해보기 클래스 두개 존재
클래스 선언방법