전체 글

bug : 코드를 작성할 때 의도하지 않은 문제입니다. debug : 프로그래밍 과정 중에 발생하는 오류나 비정상적인 연산, 즉 버그를 찾고 수정하는 것입니다. debugging : 버그를 올바르게 잡는 행위입니다. debugger : 디버깅에 쓰이는 도구입니다. ※ 자세한 건 영상 참조 step1 : 프로그래밍을 멈춤 (double click -> break pointer) step2 : Debug 실행 버튼 click perspective (java -> debug 전환) step-over click시 한 명령어만 실행. 즉, debuger를 이용하면, 프로그램을 한줄한줄 실행가능 또한, 그 순간 어플리케이션 내 변수의 상태를 하나하나 체크 가능 step3 : 중간부분 자동실행 시 해당부분 줄번호 더..
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 Secu..
다운로드 받아야 할 파일이 있는 깃허브 링크 : https://github.com/egoing/java-iot GitHub - egoing/java-iot Contribute to egoing/java-iot development by creating an account on GitHub. github.com 다운 받고 압축 푼 후에 Programmin 프로젝트에 드래그 해서 붙여넣기를 합니다. 그러면 다음 수업 준비 완료.
public class Program { public static void main(String[] args) { System.out.println(1); System.out.println(2); System.out.println(3); } }
public class Casting { public static void main(String[] args) { double a = 1.1; double b = 1; double b2 = (double) 1; System.out.println(b); //int c = 1.1; double d = 1.1; int e = (int) 1.1; System.out.println(e); // 1 to String String f = Integer.toString(1); System.out.println(f.getClass()); } } .getClass() : 데이터의 타입을 알려주는 함수입니다.
public class Letter { public static void main(String[] args) { String name = "leezche"; System.out.println("Hello, "+name+" ... "+name+" ... egoing ... bye"); double VAT = 10.0; System.out.println(VAT); } }
public class Variable { public static void main(String[] args) { int a = 1; // Number -> integer ... -2, -1 , 0, 1, 2 ... System.out.println(a); double b = 1.1; // real number -> double ... -2.0, -1.0, 0, 1.0, 2.0 ... System.out.println(b); String c = "Hello World"; System.out.println(c); } }
public class StringOperation { public static void main(String[] args) { System.out.println("Hello World".length()); // 11 System.out.println("Hello, [[[name]]] ... bye. ".replace("[[[name]]]", "duru")); } } 1. length - 문자열 길이를 구할 때 사용 - 형식 : 문자열.length() 2. replace - 원하는 문자의 데이터 변경가능. - 많은 양의 데이터가 들어가 있을 때, 자신이 원하는 데이터 변경이 쉽지 않은데, 이를 보완 - 형식 : "변경 타겟 문자열".replace("변경 타겟 문자열", "변경 후 문자열") 3. 그 외 ..
kms152000
백엔드 공부