냠냠냠
window - preferences General - Editors - Text Editors -> show line numbers 체크
- 서버를 delete후 재설정 하려고 할때 next버튼이 비활성화 될 경우 1.이클립스종료 2.워크스페이스 폴더로 이동 workspace/.metadata/.plugins/org.eclipse.core.runtim/.settings 까지 이동 3. .settings 폴더안에있는 3-1 org.eclipse.wst.server.core.prefs 삭제 3-2 org.eclipse.jst.server.tomcat.core.prefs 삭제 4. 이클립스 실행후 서버 추가.
참고) jdk 문서 : https://docs.oracle.com/javase/9/docs/api/index.html?overview-summary.html Java SE 9 & JDK 9 docs.oracle.com - concat : 문자열 연결 1 2 3 4 5 6 7 8 9 10 11 public class SelfTestClass { public static void main(String[] args) { String st1 = "coffee"; String st2 = "bread"; String st3 = st1.concat(st2); System.out.println(st3); // 결과: coffeebread } } http://colorscripter.com/info#e" target="..
- 개인적으로 자바 용어를 정리하는 글 클래스 로딩(Class Loading) : 가상머신이 특정 클래스 정보를 읽는 행위 // 특정 클래스의 인스턴스 생성을 위해서는 해당 클래스가 반드시 가상머신에 의해 로딩되어야 함. 클래스 변수(static 변수) : 인스턴스 간에 데이터 공유가 필요한 상황에서 선언 // ex) static final double PI = 3.1415; 메소드 오버로딩(Method Overloading) : 한 클래스 내에 동일한 이름의 메소드를 둘 이상 허용하지 않는다. 매개변수 선언을 달리하여 가능케 하는 것이 메소드 오버로딩. // ex) void test(int n) {} , void test(int n) {} void test(int n1, int n2) {} , void..

문제) 십진수 정수를 받아 이진수로 출력하기. (메소드를 재귀의 형태로 정의할 것) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 public class MethodJustice { public static void main(String[] args) { trans(11); } public static int trans(int n) { if(n > 0) { int binary = n % 2; // 1, 1, 0, 1 n /= 2; // 5, 2, 1, 0 trans(n); // trans(5), trans(2), trans(1), trans(0) System.out.print(binary); } return 0; } } http://colorscripter.com/info#e..
문제) 재귀적 함수를 이용해서 2의 n 승을 계산하여 출력하기 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 public class MethodJustice { public static void main(String[] args) { System.out.println(nFac(3)); System.out.println(nFac(5)); System.out.println(nFac(10)); } public static int nFac(int n) { if(n==0) return 1; else return 2*nFac(n-1); } } http://colorscripter.com/info#e" target="_blank" style="color:#e5e5e5text-decoration:no..
문제) 전달된 값을 통해 소수이면 출력하기 (100 이하까지) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 public class MethodJustice { public static void main(String[] args) { boolean tf1; int count = 1; while(count cs