본문 바로가기

Programming/[JAVA]

(16)
[JAVA] Generic & Vector를 이용한 성적 출력 프로그램(GUI) 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 12..
[JAVA] 익명 내부 클래스(AWT 이용)(Anonymouse Inner Class) 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 package pack02; import java.awt.*; import java.awt.event.*; public class AnonymousEx extends Frame implements ActionListener{ Panel p1..
[JAVA] 단축키 정리 1. Ctrl + Shift + L : 이클립스 전체 단축키를 볼 수 있다. 2. Ctrl + F11 : 최근 실행한 Run 실행 3. Ctrl + D : 줄 삭제 4. Alt + ↑ , Alt + ↓ : 줄 위치 바꿈 5. Ctrl + Shift + O : 사용하지 않는 import 삭제, 필요한 import 추가 6. Ctrl + H : 검색 창을 open 7. Ctrl + F : 찾기/바꾸기 창을 open 8. Ctrl + L : 입력한 라인의 줄로 이동 9. Ctrl + Page Up , Ctrl + Page Down : 코드 편집 창에 여러 개의 창이 띄워져 있을 경우 좌/우 창 이동 10. Ctrl + F6 : 현재 띄워져 있는 파일간 이동 11. Ctrl + F7 : 뷰간 이동 ( 네비게이션..
[JAVA] this call 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 package pack02; public class ThisCall { private int a; private int b; public ThisCall() { this(0, 0); //this 내 자신의 생성자를 불러라. 0, 0 int 2개를 넣을 수 있는 System.out.println("디폴트 생성자"); //a = b = 0; } public ThisCall(int data) { this(data, 0); System.out.println("생성..
[JAVA] Anonymous Inner Class 익명 내부 클래스 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 package pack02; abstract class Abs{ abstract void disp(); } class MemberInner { private int a = 10; public int b =20; protected static int c = 30; public Abs abs = new Abs() { @Override void disp() { // TODO Auto-generated method stub System.out.println(..
[JAVA] Static Inner Class 스태틱 내부 클래스 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 package pack02; class MemberInner { private int a = 10; public int b =20; protected static int c = 30; static class Member { public void disp() { //System.out.println(a); //System.out.println(b); System.out.println(c); } } } public class InnerClassStatic { public static void main(String[] args) { // TODO Auto-generated me..
[JAVA] LocalInnerClass 로컬 내부 클래스 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 31 32 33 package pack02; class MemberInner { private int a = 10; public int b =20; protected static int c = 30; public void output() { class Member { public void disp() { System.out.println(a); System.out.println(b); System.out.println(c); } } Member m = new Member(); m.disp(); } } public class InnerClassLocal { pub..
[JAVA] MemberInnerClass 멤버 내부 클래스 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 package pack02; class MemberInner { private int a = 10; public int b =20; protected static int c = 30; class Member { public void disp() { //System.out.println(a); //System.out.println(b); System.out.println(c); } } } public class InnerClassMember { public static void main(String[] args) { // TODO Auto-generated method stub ..