위에 프로덕트 클래스 있고
밑에
MainApp클래스 밑에
static void Main(string[] args)
{
Product carrot = new Product();
.
.
.
}
이렇게 돼있는데
new Product();
가 뭐냐
위에 프로덕트 클래스 있고
밑에
MainApp클래스 밑에
static void Main(string[] args)
{
Product carrot = new Product();
.
.
.
}
이렇게 돼있는데
new Product();
가 뭐냐
힙영역에 객체 생성
힙이 안없어지는거던가
Product 타입의 인스턴스 생성
뭐 이따 배우겠찌머
생성자 호출
근데 자바왜험?
씨샵임
씨샵 자바랑 똗같네..충격