관리 메뉴

Just Do it

Java 프로그래밍 본문

1. Github 에서 다운로드 받은 파일을 복사, 붙여넣기 하여 나만의 프로그램을 만드는데 사용할 수 있다.

이 말은 다른 사람이 이미 만들어 놓은 코드를 언제든지 활용하여 내가 프로그램을 만들때 활용할 수 있다는 것. 

 

2. 구글 검색을 생활화 하자. 모르는걸 잘 찾아서 활용하는 것도 중요한 능력. 

 

// 1. 클래스 불러오기 

import org.opentutorials.iot.Elevator; 

import org.opentutorials.iot.Security;

import org.opentutorials.iot.Lighting;

 

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();

// 

 

}

 

}