java를 처음 사용하였습니다. 책을 따라 코딩 연습. Heres는기본 Java 코드를 컴파일하는 중 오류가 발생했습니다.
내 코드 : 내가 컴파일 할 때
class Motorcycle {
//Three instance variables - make and color are strings. while a boolean refers to TRUE OR FLASE(in this case off or on)
String make;
String color;
boolean engineState;
void startEngine() {
if (engineState == true)
System.out.print("The engine is already on.");
else {
engineState = true;
System.out.print("The engine is now on.");
}
void showAtts() {
System.out.print("This motorcycle is a " + color + " " + make);
if (engineState ==true)
System.out.print("The engine is on.");
else System.out.print("The engine is off.");
}
}
}
내가이 오류를 얻을 : 표현 2의
1) 불법 시작) 예상
문제점을 지적 할 수 없습니다. 누구든지 나를지도하거나 힌트를 주시면 제발 할 수 있습니다.
[NetBeans] (https://netbeans.org/), [Intellij] (http://www.jetbrains.com/idea/) 또는 [Eclipse]와 같은 IDE 사용 (http : // www. eclipse.org/downloads/)는 이런 오류를 피할 수 있습니다. 나는 [Notepad ++] (http://notepad-plus-plus.org/)와 [JEdit] (http://www.jedit.org/) 같은 몇 가지 기본 편집자조차도 구문 강조와 관련하여 몇 가지 언어 지원을한다고 생각한다. 대괄호 일치) –
큰 충고가 들립니다. 지금 다운로드 중입니다. – KKP