-
카테고리
-
세부 분야
프로그래밍 언어
-
해결 여부
미해결
1강 문제풀이 질문입니다.
24.04.17 23:41 작성 조회수 51
0
강의 클래스와 데이터 문제풀이 6분 45초에서 아래와 같이 작성하면 productName에서 빨간 줄이 나오는데 객체를 생성을 안하고 바로 객체 배열에 접근해서 그러는건가요?
package ex1;
public class ProductOrderMain {
public static void main(String[] args) {
ProductOrder[] orders= new ProductOrder[3];
ProductOrder order1= new ProductOrder();
orders.productName="두부";
}
}
답변을 작성해보세요.
답변 1