전체 글 (15) 썸네일형 리스트형 Java 기초 독학 - printf()의 지시자 printf() 함수를 이용하면 변수값의 출력 형식을 지정하여 출력할 수 있다. printf()의 지시자 %d : 10진 정수 %[5d] : 정수값을 다섯 자리로 출력한다. System.out.printf("[5d]%n", 10); 의 경우 " 10"으로 출력된다(공백 3칸 후 10). 5자리를 초과하는 정수값의 경우 그래도 출력된다. %[-5d] : 왼쪽 정렬로 다섯 자리로 출력한다. System.out.printf("[-5d]%n", 10);로 하면 "10 "으로 출력된다(10 후 공백 3칸). 단 System.out.printf("[-05d]%n", 10)와 같은 표현은 허락되지 않는다. %[05d] : 다섯 자리로 출력하고 빈 자리에 0을 붙인다. System.out.printf("[05d]%n".. 정규 표현식(Regular Expression) : re library(python) - (1) 정규 표현식에 대한 위키피디아의 정의는 다음과 같다. A regular expresstion (Shortened as regex or regexp; sometimes reffered to as rational expression) is a sequence of chararters that specifies a match pattern in text. Usually such patterns are used by string-searching algorithms for "find" or "find and replace" operations on strings, or for input validation. Regular expression techniques are developed in theoretical.. 첫번째 개인 프로젝트 히스토리_2 : 배관 계산기 이번 개인 프로젝트를 수행하면서 객체 지향 개념에 대해 익숙해지는 기회로 삼을 수 있었다. 배관 material이라는 것이 사실 클래스와 속성(attribute), parent-child 관계에 딱 적합한 것들이라 그럴 지 모르겠다. 위 메모는 클래스 구성의 초기 버전이었다. 8개의 클래스와 8개의 속성, 5개의 메서드가 서로 관계를 맺고 있다. 이전 1 2 3 4 5 다음