그래서 일부 Java 작성을 시작하기 위해 netbeans를 사용하고 있습니다. 나는 "Java21"이라는 프로젝트를 만들었고 그 안에 VolcanoRobot.java 파일 (이것은 단지 클래스), VolcanoApplication.java (이것이 실행하려고하는 것), 그리고 Java21.java 파일 (내가 생각하는 것이 바로 프로젝트를 생성시 생성 Java/Netbeans 빌드 성공했지만 println이 표시되지 않습니다.
여기 내 VolcanoApplication.java 파일은 다음과 같습니다. 내가 "실행 프로젝트"를 클릭하면 출력 창은 "빌드 성공"라고, 어떤 속도로class VolcanoApplication {
public static void main(String[] arguments) {
VolcanoRobot dante = new VolcanoRobot();
dante.status = "exploring";
dante.speed = 2;
dante.temperature = 510;
dante.showAttributes();
System.out.println("Increasing speed to 3.");
dante.speed = 3;
dante.showAttributes();
System.out.println("Changing temperature to 670.");
dante.temperature = 670;
dante.showAttributes();
System.out.println("Checking the temperature.");
dante.checkTemperature();
dante.showAttributes();
}
}
하지만 위의 코드가 뱉어 내야하는 텍스트는 없습니다 (System.out.println ...)
두 가지 "주"방법을 사용하지만 어떤 h elp 많이 감사!
감사합니다, Mariogs
예, 그렇다고 가정 할 수 있습니다. 그 두 가지 방법은 어디에 있습니까? 그리고 정확히 어떤 수업을하고 있습니까? –
프로젝트가 넷빈의 기본 프로젝트입니까? – Transcendent
@ JeroenVannevel : 오류가없고 예외도없는 경우 어떻게 해당 메서드가있는 곳에서 어떤 차이가 있습니까? – Transcendent