Description

※ 본 문제는 두 코드 파일, Car.java와 CarExam.java로 구성되어있습니다. 파일 이름을 클릭하면 파일 내용물을 볼 수 있습니다.

CarExam.java의 c1 변수가 Car class의 객체를 저장하게 빈칸을 채워보세요. Car class는 Car.java 파일에 정의해두었습니다.

힌트[1]


객체를 만드는 방법

객체를 생성할 때에는 new를 사용해야 합니다. 다음은 String 클래스의 객체를 만드는 코드입니다.

String str1 = new String("hello");

[1]: 빈칸에 new Car();라고 적고, 코드를 제출해보세요.

  • You need to fill in the blank with the appropriate code.
  • You cannot modify the given code.
  • An error message will appear in the result if you leave the blank empty.
Result Stop
Result of [Run Test] or [Submit] will be displayed here
내가 제출한 코드가 왜 틀렸는지 프로그래머스 AI에게 물어보세요.
제출 후 채점하기를 눌러 30점 이상인 경우 물어볼 수 있어요.
베타 기간 동안에는 한 문제당 1번만 물어볼 수 있어요.