Programming 프로젝트에 OkJavaGoInHome 클래스 생성할 때 package란에 자동으로 위치 지정돼 있으면 빈칸으로 만듭니다.
import org.opentutorials.iot.Elevator;
import org.opentutorials.iot.Lighting;
import org.opentutorials.iot.Security;
public class OkJavaGoInHome {
public static void main(String[] args) {
String id = "JAVA APT 507";
// Elevator call
Elevator myElevator = new Elevator(id);
myElevator.callForUp(1);
// Security off
Security mySecurity = new Security(id);
mySecurity.off();
// Light on
Lighting hallLamp = new Lighting(id+" / Hall Lamp");
hallLamp.on();
Lighting floorLamp = new Lighting(id+" / floorLamp");
floorLamp.on();
}
}
'JAVA > 생활코딩 JAVA 입문 수업' 카테고리의 다른 글
JAVA1 - 11.1. 입력과 출력 (0) | 2023.03.21 |
---|---|
JAVA1 - 10. 디버거 (0) | 2023.03.21 |
JAVA1 - 9.2. 프로그램 만들기 - IoT 라이브러리 설치하기 (0) | 2023.03.14 |
JAVA1 - 9.1. 프로그래밍이란 무엇인가? (0) | 2023.03.14 |
JAVA1 - 8.3. 데이터 타입의 변환 (casting) (0) | 2023.03.13 |