code
stringlengths
3
1.18M
language
stringclasses
1 value
/* ***** BEGIN LICENSE BLOCK ***** * Version: GPL 2.0 * * The contents of this file are subject to the GNU General Public * License Version 2 or later (the "GPL"). * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the Lic...
Java
/* ***** BEGIN LICENSE BLOCK ***** * Version: GPL 2.0 * * The contents of this file are subject to the GNU General Public * License Version 2 or later (the "GPL"). * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the Lic...
Java
/* ***** BEGIN LICENSE BLOCK ***** * Version: GPL 2.0 * * The contents of this file are subject to the GNU General Public * License Version 2 or later (the "GPL"). * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the Lic...
Java
/* ***** BEGIN LICENSE BLOCK ***** * Version: GPL 2.0 * * The contents of this file are subject to the GNU General Public * License Version 2 or later (the "GPL"). * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the Lic...
Java
/* ***** BEGIN LICENSE BLOCK ***** * Version: GPL 2.0 * * The contents of this file are subject to the GNU General Public * License Version 2 or later (the "GPL"). * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the Lic...
Java
/* ***** BEGIN LICENSE BLOCK ***** * Version: GPL 2.0 * * The contents of this file are subject to the GNU General Public * License Version 2 or later (the "GPL"). * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the Lic...
Java
/* ***** BEGIN LICENSE BLOCK ***** * Version: GPL 2.0 * * The contents of this file are subject to the GNU General Public * License Version 2 or later (the "GPL"). * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the Lic...
Java
/* ***** BEGIN LICENSE BLOCK ***** * Version: GPL 2.0 * * The contents of this file are subject to the GNU General Public * License Version 2 or later (the "GPL"). * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the Lic...
Java
/* ***** BEGIN LICENSE BLOCK ***** * Version: GPL 2.0 * * The contents of this file are subject to the GNU General Public * License Version 2 or later (the "GPL"). * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the Lic...
Java
/* ***** BEGIN LICENSE BLOCK ***** * Version: GPL 2.0 * * The contents of this file are subject to the GNU General Public * License Version 2 or later (the "GPL"). * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the Lic...
Java
/* ***** BEGIN LICENSE BLOCK ***** * Version: GPL 2.0 * * The contents of this file are subject to the GNU General Public * License Version 2 or later (the "GPL"). * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the Lic...
Java
/* ***** BEGIN LICENSE BLOCK ***** * Version: GPL 2.0 * * The contents of this file are subject to the GNU General Public * License Version 2 or later (the "GPL"). * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the Lic...
Java
/* ***** BEGIN LICENSE BLOCK ***** * Version: GPL 2.0 * * The contents of this file are subject to the GNU General Public * License Version 2 or later (the "GPL"). * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the Lic...
Java
/* ***** BEGIN LICENSE BLOCK ***** * Version: GPL 2.0 * * The contents of this file are subject to the GNU General Public * License Version 2 or later (the "GPL"). * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the Lic...
Java
/* ***** BEGIN LICENSE BLOCK ***** * Version: GPL 2.0 * * The contents of this file are subject to the GNU General Public * License Version 2 or later (the "GPL"). * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the Lic...
Java
/* ***** BEGIN LICENSE BLOCK ***** * Version: GPL 2.0 * * The contents of this file are subject to the GNU General Public * License Version 2 or later (the "GPL"). * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the Lic...
Java
/* ***** BEGIN LICENSE BLOCK ***** * Version: GPL 2.0 * * The contents of this file are subject to the GNU General Public * License Version 2 or later (the "GPL"). * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the Lic...
Java
/* ***** BEGIN LICENSE BLOCK ***** * Version: GPL 2.0 * * The contents of this file are subject to the GNU General Public * License Version 2 or later (the "GPL"). * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the Lic...
Java
/* ***** BEGIN LICENSE BLOCK ***** * Version: GPL 2.0 * * The contents of this file are subject to the GNU General Public * License Version 2 or later (the "GPL"). * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the Lic...
Java
/* ***** BEGIN LICENSE BLOCK ***** * Version: GPL 2.0 * * The contents of this file are subject to the GNU General Public * License Version 2 or later (the "GPL"). * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the Lic...
Java
/* ***** BEGIN LICENSE BLOCK ***** * Version: GPL 2.0 * * The contents of this file are subject to the GNU General Public * License Version 2 or later (the "GPL"). * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the Lic...
Java
/* ***** BEGIN LICENSE BLOCK ***** * Version: GPL 2.0 * * The contents of this file are subject to the GNU General Public * License Version 2 or later (the "GPL"). * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the Lic...
Java
/* ***** BEGIN LICENSE BLOCK ***** * Version: GPL 2.0 * * The contents of this file are subject to the GNU General Public * License Version 2 or later (the "GPL"). * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the Lic...
Java
/* ***** BEGIN LICENSE BLOCK ***** * Version: GPL 2.0 * * The contents of this file are subject to the GNU General Public * License Version 2 or later (the "GPL"). * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the Lic...
Java
/* ***** BEGIN LICENSE BLOCK ***** * Version: GPL 2.0 * * The contents of this file are subject to the GNU General Public * License Version 2 or later (the "GPL"). * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the Lic...
Java
package fr.aliasource.webmail.server; import fr.aliasource.webmail.client.rpc.Heartbeat; import fr.aliasource.webmail.server.proxy.client.IAccount; public class HeartbeatImpl extends SecureAjaxCall implements Heartbeat { private static final long serialVersionUID = 2901787351621042484L; @Override public boolean ...
Java
/* ***** BEGIN LICENSE BLOCK ***** * Version: GPL 2.0 * * The contents of this file are subject to the GNU General Public * License Version 2 or later (the "GPL"). * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the Lic...
Java
/* ***** BEGIN LICENSE BLOCK ***** * Version: GPL 2.0 * * The contents of this file are subject to the GNU General Public * License Version 2 or later (the "GPL"). * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the Lic...
Java
/* ***** BEGIN LICENSE BLOCK ***** * Version: GPL 2.0 * * The contents of this file are subject to the GNU General Public * License Version 2 or later (the "GPL"). * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the Lic...
Java
package fr.aliasource.webmail.server; public class MessageBeautifier { private static String PATTERN_URL_WITH_HTTP = "[^\">](((http://)|(https://))" + "+[a-zA-Z_0-9\\-]+(\\.\\w[a-zA-Z_0-9\\-]+)" + "+(/[#&;\\n\\-=?:|,()@\\+\\%/\\.\\w]+)?+(:[0-9]*+)?)"; private static String PATTERN_URL_WITH_HTTP_START = "^(((...
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; class Sw2{ public int x,y; public static void sw2(Sw2 boo) { int tmp; tmp = boo.x; boo.x = boo.y; boo.y = tmp; System.out.println(" sw2 x= " + boo.x + " sw2 y = " + boo.y); } } class ex_5...
Java
class Jv_3_7 { public static void main(String[] args) { int x=10, y=20, ken, boo, yoo, soo; ken=boo=30; yoo = (ken == boo ? x: y); soo = (ken < boo ? x: y); System.out.println("***** result *****\n"); System.out.println("yoo = " + yoo + ",  soo = " + soo); } }
Java
class Sungjuk_5_3 { String hakbun; String name; int jumsu; int c_cnt; static int class_cnt; public Sungjuk_5_3(){ c_cnt = class_cnt++; } static public void title(){ System.out.println("**** 자바의 객체 생성 및 속성 사용 ****"); System.out.println("**** 정보통신전자공학부 ****"); System.out.println("**...
Java
class Sungjuk_5_2 { String hakbun; String name; int jumsu; int c_cnt; static int class_cnt; public Sungjuk_5_2(){ c_cnt = class_cnt++; } } class ex_5_2{ public static void main(String args[]){ Sungjuk_5_2 sooeun_jang = new Sungjuk_5_2(); sooeun_jang.hakbun = "20052426"; sooeun_jang.name = ...
Java
class ex_2_1{ public static void main(String[] args){ int ken=65; System.out.print("Welcome to java!\n"); System.out.print(" ken 변수의 값:" + ken + "\n"); System.out.println("Welcome to java!\n"); System.out.println(" ken 변수의 값:" + ken); } }
Java
public class ex_3_1{ public static void main(String[] args){ int ken=10, yoo=-20, boo; boo=-yoo; System.out.println("*** result ***"); System.out.println("ken =" + ken + ","+ "yoo =" + yoo + ","+ "boo =" + boo); System.out.println("++ken=" + (++ken) + ", ken=" + ken); System...
Java
class ex_4_6 { public static void main(String[] args) { int n, hap; System.out.println("***** result *****"); n=hap=0; // for 문을 사용하여 1`100까지 합을 구하는 식을 구하라. System.out.println("1+2+3+...+100 = " + hap + "(for statement)"); n=1; hap=0; // while 문을 사용하여 1`100까지 합을 구하는 식을 구하라. Sys...
Java
class Sungjuk_6_8_1{ public String hakbun; public String name; public int jumsu; } class Sungjuk_6_8_2{ private String hakbun; private String name; private int jumsu; public void set_hakbun(String h) { hakbun = h;} public void set_name(String n) {name=n;} public void set_jumsu(int j) {jumsu = j;} ...
Java
import java.io.*; class ex_4_4 { public static void main(String[] args) throws java.io.IOException { int jumsu; char hakjum; String iput; System.out.println("***** result *****"); System.out.print("Input jumsu: "); InputStreamReader kkk = new InputStreamReader(System.in); Buffe...
Java
import java.awt.*; import java.awt.event.*; public class ex7_extra1 extends Frame implements ActionListener{ Button bt1,bt2,bt3,bt4,bt5,bt6; Label label0,label1; Panel p01; TextField text1; String msg="당신이 좋아하는 지명을 선택 하기 바랍니다."; String msg1="선택한 지명: "; String msg2=""; public ex7_extra1(){ super("...
Java
public class ex_3_5 { public static void main(String[] args) { int ken=2, boo=7, yoo=-7; System.out.println("***** result *****\n"); System.out.println("ken=2, boo=7, yoo=-7"); System.out.println("--- bitwise AND ---"); System.out.println("ken&boo -> " + (ken&boo)); System.out.println(...
Java
import MyPackage.*; class packagetest{ public static void main(String[] args){ Circle c = new Circle(); System.out.println(" 객체 형변환과 오버라이딩 이용 "); if(c instanceof Circle) System.out.println(" c는 Circle의 객체 "); else System.out.println(" a는 Triangle클래스의 객체가 아님"); } }
Java
import java.awt.*; import java.awt.event.*; public class ex_7_4 extends Frame implements ActionListener, ItemListener, AdjustmentListener { Checkbox ch, da, so, se, je; Checkbox gch, gda, gso, gse, gje; CheckboxGroup cbg; Label label1, label2, label3, label4, label5, lb0; Scrollbar vSlider, hSlider; Can...
Java
public class ex_4_1{ public static void main(String[] args){ int ken = 100; System.out.println("*** result ***"); if((ken>>1) < 70) System.out.println((ken>>1) + " is less than 70"); } }
Java
public class ex_2_4{ public static void main(String[] args) { int i = 65; short j = 65; float x = 65.0F; double y = 65.0; System.out.println("***데이터형 변환(data type conversion)***"); System.out.println("<정수형에서 실수형으로 변환>"); System.out.println("int i = " + i); System.out.println("(float) i = ...
Java
import java.awt.*; import java.awt.event.*; public class ex7_extra2 implements ActionListener, ItemListener{ Frame frame; Label label0,label1; Canvas imgCanvas; Button bt0,bt1; List list; public ex7_extra2(){ frame = new Frame("리스트에서 결정된 내용 이미지 캔버스에 반영"); list = new List(3,false); list.add("...
Java
class ex_5_8_1{ public void sub(){ System.out.println("-- no argument --"); System.out.println("welcome to JAVA!"); System.out.println("JAVA is very fun! \n"); } public void sub(int a, int b){ System.out.println("-- argument & no return --"); //int c; System.out.println(a + " + " + b + " = ...
Java
public class ex_3_8 { public static void main(String[] args) { int x, y; float c, d; x = 10; y = 3; c = x/y; d = (float)x/y; System.out.println("***** result *****"); System.out.println("c == " + c + ",  d == " + d); } }
Java
public class ex_4_8{ public static void main(String[] srgs){ int ary[]={10,20,30,40,50}; int i,ave,sum=0; System.out.println("** result ***"); for(i=0;i<5;i++) System.out.println("ary[" + i + "]=" + ary[i]); for(i=0;i<5;i++) sum+=ary[i]; ave=sum/5; System.out.println("sum =" + sum); ...
Java
import java.awt.*; import java.applet.*; public class ex_1_6 extends Applet{ /** * */ private static final long serialVersionUID = 1L; public void paint(Graphics g){ g.drawString("Welcome to JAVA!",50,50); } }
Java
class Jv_2_3 { public static void main(String[] args) { int i = 65; short j = 65; long k = 65L; int decimal_v = 10; int octal_v = 010; int hexa_v = 0X10; float x = 65.0F; double y = 65.0; char z = 65; char zz = 'A'; char zzz = '\u0041'; char z_z = 66; char z_zz =...
Java
class ex_4_3 { public static void main(String[] args) { int x=10, y=4; int ken; System.out.println("***** result *****"); ken = x & y; if (ken>0) System.out.println("(x&y) is + "); else if (ken<0) System.out.println("(x&y) is -"); else System.out.println("(x&y) is 0"); } } ...
Java
class D1{ int x = 1000; void display(){ System.out.println("상위클래스 D1의 display()메소드"); } } class D2 extends D1{ int x = 2000; void display(){ System.out.println("하위클래스의 D2의 display()메소드"); } void write(){ this.display(); super.display(); System.out.println("D2클래스 객체의 x값:" + x); System.o...
Java
class ex_4_7 { public static void main(String[] args) { int i, j; System.out.println("***** result *****\n"); for(i=1; i<10; i++) { for (j=1; j<10; j++) System.out.println(i + "*" + j + "=" + i*j + "  "); if (j==10) System.out.println("\n"); } } }
Java
public class ex_1_4 { public static void main(String[] args) { System.out.println("Hello2"); } }
Java
import java.io.*; class Jv_4_5 { public static void main(String[] args) throws java.io.IOException { int jumsu; char hakjum; String iput; System.out.println("***** result *****"); System.out.print("Input jumsu: "); InputStreamReader kkk = new InputStreamReader(System.in); Buffer...
Java
class ex_5_6{ public static void main(String[] args){ System.out.print("*** main() 메소드 ***"); System.out.print("\n\n"); System.out.print("명령 라인의 전체 문자열:"); for(int i=0; i<args.length;i++){ System.out.print(args[i] + " "); } System.out.print("\n\n"); System.out.println("명령 라인의 전체 문자열 수" + args...
Java
import java.awt.*; public class ex_7_1 { private Frame f; private Label lb, lb0, lb1, lb2, lb3, lb4, lb5, lb6, lb7; private Button bt0, bt1, bt2, bt3, bt4, bt5; private TextField t; private TextArea ta1, ta2; int m=0,n=0; int i=0,j=0; public ex_7_1(){ f = new Frame("AWT(Abstract Window Toolk...
Java
import java.awt.*; import java.awt.event.*; public class ex7_extra3 implements ActionListener{ Frame f; CheckboxGroup cbg; Checkbox gch,gda,gso,gse,gje; Label label0,label1; TextArea textarea; TextField textfield; String str1,str2,str3; Button bt0; int m=50,n=7; int i=0,j=0; public ex7_extr...
Java
class Sungjuk_5_1 { String hakbun; String name; int jumsu; } class ex_5_1{ public static void main(String[] args){ Sungjuk_5_1 sooeun_jang = new Sungjuk_5_1(); sooeun_jang.hakbun = "20052426"; sooeun_jang.name = "jang,soo-eun"; sooeun_jang.jumsu = 99; Sungjuk_5_1 minsu_kim = new Sungjuk...
Java
class Sungjuk_6_2{ String hakbun; String name; int jumsu; public void set_hakbun(String hakbun){ this.hakbun = hakbun; } public void set_name(String name){ this.name = name; } public void set_jumsu(int jumsu){ this.jumsu = jumsu; } void prt_data(){ System.out.println(hakbun + " " + name ...
Java
public class ex_3_4 { public static void main(String[] args) { boolean x=true, y=true, z=false; System.out.println("***** result *****"); System.out.println("boolean x=true, y=true, z=false"); System.out.println("--- logical AND ---"); System.out.println("x&&y ->" + (x&&y)); System.out.prin...
Java
public class ex_2_2{ /** * */ private static final long serialVersionUID = 1L; public static void main(String[] args) throws java.io.IOException{ int ken; System.out.print("수를입력하세요!!"); ken = System.in.read(); System.out.println("입력하신숫자는? :"+ken); } }
Java
class ex_4_11 { public static void main(String[] args) { String title[] = {"JAVA ","HTML ","C   ","TOTAL"}; int jumsu[][] = {{77, 66, 88}, {90, 80, 100}, {65, 75, 85}}; int i, j, total; System.out.println("*** sung juk pyo ***\n"); for(i=0; i < title.length; i++) System.out.print(title[i] +...
Java
import java.io.File; class FileDirDemo1{ public static void main(String args[]){ String directory = "c:/jython2.2.1"; File f1 = new File(directory); if(f1.isDirectory()){ System.out.println("검색 디렉토리 "+ directory); System.out.println("========================"); String s[] = f1.list(); ...
Java
public class ex_3_6 { public static void main(String[] args) { int x=7, y=2; int a, b; a = 7; b= 2; System.out.println("***** result *****\n"); System.out.println("x=" + x + ", y=" + y); System.out.println("a=" + a + ", b=" + b); System.out.println("x+=y -> " + (x+=y) + ",a=a+b ...
Java
class A_1{ int d1; int s; public A_1(int s1){ System.out.println("클래스 A1의 생성자 수행"); s = s1; d1 = s*s; } } class A_2 extends A_1{ int d2; int t; A_2(int s1,int t1){ super(s1); System.out.println("클래스 A2의 생성자 수행"); t = t1; d2 = t*t; } } class constructor{ public static void ma...
Java
public class ex_3_2 { public static void main(String[] args) { int x=100, y=30; System.out.println("***** result *****"); System.out.println("x+y =" + (x+y)); System.out.println("x-y =" + (x-y)); System.out.println("x*y =" + (x*y)); System.out.println("x/y =" + (x/y)); System.out.printl...
Java
import java.awt.*; import java.awt.event.*; public class project extends Frame implements ActionListener{ Button bt1,bt2,bt3,bt4,bt5,bt6; Label label0,label1; Panel p01; TextField text1; String msg="당신이 좋아하는 지명을 선택 하기 바랍니다."; String msg1="선택한 지명: "; String msg2=""; public project(){ super("버튼/텍스트...
Java
public class ex_3_3 { public static void main(String[] args) { int x=50, y=30; System.out.println("***** result *****"); System.out.println("x<y  ->" + (x<y)); System.out.println("x<=y ->" + (x<=y)); System.out.println("x>y  ->" + (x>y)); System.out.println("x>=y ->" + (x>=y)); Syste...
Java
class Sungjuk_6_4{ void title(){ System.out.println("** 추상클래스 ***"); System.out.println("** 자바 성적 출력 ***"); System.out.println("** 학번 성명 점수 ***"); System.out.println("** ---------- ***"); } } abstract class Sungjuk_6_4_1 extends Sungjuk_6_4{ String hakbun1 = "2062001"; String name1 = "hahaha"; ...
Java
import java.awt.Frame; import java.awt.Graphics; public class ex_1_5 extends Frame { /** * */ private static final long serialVersionUID = 1L; public ex_1_5 (String title){ super(title); setSize(300,200); setVisible(true); } public void paint(Graphics g){ g.drawString("MY NAME IS JANG...
Java
class Acast{ int a=1; } class Bcast extends Acast{ int b=2; } class Ccast extends Bcast{ int c=3; } class testcasting{ public static void main(String[] args){ Acast refA; refA = new Ccast(); System.out.println("refA.a의 값은 " + refA.a); } }
Java
import java.awt.*; import java.awt.event.*; public class ex_7_3 implements ActionListener, TextListener { private Frame f; private Label lb, lb0, lb1, lb2, lb3, lb4, lb5, lb6, lb7, label1, label2, label3; private Button bt0, bt1, bt2, bt3, bt4, bt5; private TextField t; private TextArea ta1, ta2; int...
Java
class A1{ int i,j; A1(int x,int y){ i=x; j=y; } void show(){ System.out.println("class A의 show() 메서드"); } } class B2 extends A1{ int k; B2(int x,int y, int z){ super(x,y); k=z; } void show(){ System.out.println("하위클래스 B의 show()메서드"); System.out.println("=== super를 이용한 상위 클래스 ...
Java
package MyPackage; abstract class Shape{ abstract void draw(); } public class Circle extends Shape{ void draw(){ System.out.println("원"); } }
Java
class Sungjuk_6_9_outer{ String hakbun; String name; int jumsu; public Sungjuk_6_9_inner in; public Sungjuk_6_9_outer() { in = new Sungjuk_6_9_inner(); } public void prt_outer(){ System.out.println(" ** 외부 클래스 ** "); } class Sungjuk_6_9_inner { public void prt_inner() { prt_outer(); S...
Java
class Sungjuk_6_7{ void title(){ System.out.println("*** instanceof 연산자 ***"); System.out.println("-----------------------"); } } class Sungjuk_6_7_1{ String hakbun; String name; } class Sungjuk_6_7_2{ int jumsu; } class ex_6_7 { public static void main(String[] args){ Sungjuk_6_7 test = new ...
Java
class Sungjuk_5_9 { String hakbun; String name; int jumsu; int c_cnt; static int class_cnt; public Sungjuk_5_9(){ c_cnt = class_cnt++; int tmp = 20052000+c_cnt; String temp; temp = tmp+""; hakbun=temp; name="Bla-Bla"; jumsu = 50; } public Sungjuk_5_9(String cons_hakbun){ c_cn...
Java
import java.io.IOException; class ex_5_4{ public static void title(){ System.out.println("**** call by value 사용 메서드호출 ****"); System.out.println("**** 정보통신전자공학부 ****"); System.out.println("**** 20052426 장수은 ****"); } public static void sw1(int x, int y){ System.out.println(" ...
Java
import java.awt.*; import java.awt.event.*; public class ex_7_2 extends Frame{ CheckboxGroup cbg; Label label1, label2, label3; Scrollbar vSlider, hSlider; Canvas imgCanvas; public ex_7_2(){ super (" 단순 컴포넌트 - 체크박스와 라디오버튼 / 리스트와 초이스/ 수직 및 수평 스크롤바 / 이미지 캔버스"); setLayout(new FlowLayout()); ad...
Java
class Sungjuk_6_5 { void title(){ System.out.println("** 추상클래스 ***"); System.out.println("** 자바 성적 출력 ***"); System.out.println("** 학번 성명 점수 ***"); System.out.println("** ---------- ***"); } } class Sungjuk_6_5_1 extends Sungjuk_6_5{ String hakbun1 = "20052426"; String name1 = "sooeun"; int jums...
Java
class Sungjuk_6_1{ String hakbun; String name; int jumsu; public void set_hakbun(String hakbun){ this.hakbun = hakbun; } public void set_name(String name){ this.name = name; } public void set_jumsu(int jumsu){ this.jumsu = jumsu; } public void prt_data(){ System.out.println(hakbun + " " ...
Java
interface Sungjuk_Info{ void set_hakbun(String hakbun); void set_name(String name); } interface Sungjuk_Grade{ void set_jumsu(int jumsu); void set_grade(String grade); } interface Sungjuk_Print extends Sungjuk_Info,Sungjuk_Grade{ void title(); void prt_data(); } class Sungjuk_6_3 implements Sungjuk_Pr...
Java
import java.awt.*; /* import java.applet.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.WindowEvent; import java.awt.event.WindowListener; */ class FrameEvent extends Frame{ Panel p01,p02,p03; Label L1,L2; Button btn01,btn02,btn03; boolean flag=false; ...
Java
class ex_5_7_1{ public void sub1(){ System.out.println("-- no argument --"); System.out.println("welcome to JAVA!"); System.out.println("JAVA is very fun! \n"); } public void sub2(int a, int b){ System.out.println("-- argument & no return --"); //int c; System.out.println(a + " + " + b + " ...
Java
import java.io.IOException; public class ex_4_2{ public static void main(String[] args) throws IOException{ int x ; System.out.println("**** result ****"); System.out.println("Input x == ?"); x = System.in.read() - '0'; if(x>0) System.out.println("x is greater than zero"); else Syst...
Java
package test; import java.util.Scanner; class AddNumbers { public static void main(String args[]) { int x, y, z; System.out.println(); Scanner in = new Scanner(System.in); x = in.nextInt(); y = in.nextInt(); z = x + y; System.out.println("Sum of entered in...
Java
package formularios; import clases.Seccion; import javax.swing.JFrame; import javax.swing.JOptionPane; public class MenuPrincipal extends javax.swing.JFrame { private Seccion seccion; private boolean evaluacion = false; public MenuPrincipal() { initComponents(); seccion = new Seccion(); ...
Java
package formularios; import clases.Profesor; import clases.Seccion; import java.util.LinkedList; import java.util.ListIterator; import javax.swing.JFrame; import javax.swing.JOptionPane; import javax.swing.JTextField; public class FormularioSeccion extends javax.swing.JFrame { LinkedList<JTextField> textos; ...
Java
package formularios; import clases.Estudiante; import java.util.LinkedList; import java.util.ListIterator; import java.util.Vector; import javax.swing.table.DefaultTableModel; public class FormularioListados extends javax.swing.JFrame { private LinkedList<Estudiante> lisEstudiante; private DefaultTableModel m...
Java
package formularios; import clases.Estudiante; import clases.Seccion; import java.util.LinkedList; import java.util.ListIterator; import javax.swing.JFrame; import javax.swing.JOptionPane; import javax.swing.JTextField; public class FormularioEstudiante extends javax.swing.JFrame { LinkedList<JTextField> textos;...
Java
package clases; import java.io.*; public class Leer { public static String dato() { String sdato=""; try { InputStreamReader isr = new InputStreamReader (System.in); BufferedReader flujo =new BufferedReader (isr); sdato=flujo.readLine(); } catch (IOException e) { System.err.println("Error"+...
Java
package clases; import java.util.*; //seccion se encargara de generar los ordenamientos class ComparadorCI implements Comparator<Estudiante> { public int compare(Estudiante est1, Estudiante est2) { return est1.getCedula().compareTo(est2.getCedula()); } } class ComparadorNF implements Comparator<Estudiante> { p...
Java
package clases; import formularios.MenuPrincipal; public class Principal { public static void main(String[] args) { new MenuPrincipal().show(); }}
Java
package clases; public class Profesor extends Persona { private String titulo; private float notaf; public Profesor(String cedula, String nombre, String apellido, String titulo) { super(cedula, nombre, apellido); this.titulo = titulo; } public Profesor() { super(); } @Override public String get...
Java
package clases; public class Estudiante extends Persona { private float nota1; private float nota2; private float nota3; private float notaf; private String estado; public Estudiante(String cedula, String nombre, String apellido, float nota1, float nota2, float nota3, float notaf, String estado) { supe...
Java
/** * Copyright 2010 Ryszard Wiśniewski <brut.alll@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless req...
Java
/** * Copyright 2010 Ryszard Wiśniewski <brut.alll@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless req...
Java
/** * Copyright 2010 Ryszard Wiśniewski <brut.alll@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless req...
Java