본문 바로가기

전체보기156

자바 기초 로직을 알아보자...2월1일 수업(3) class Test{ public static void main(String args[]){ A a=new A(100); System.out.println(a.i); B b1=new B("abc"); B b2=new B("def"); System.out.println(b1.str+","+b2.str); a.me(); String st=a.me2(); System.out.println(st); } } class A{ int i; A(int i){ this.i=i; } void me(){ System.out.println("메서드1"); } String me2(){ return "메서드2"; } } class B{ String str; B(String str){ this.str=str; } } */ /* c.. 2007. 2. 1.
자바초급 2일째 생성자 부문 리턴형 o,X //생성자// 리터형이 없는 메서드 class Test{ public static void main(String args[]){ Child ch=new Child("똘이",6); Child ch1=new Child("순이"); ch.gotoSchool(); ch.getCandy(); ch1.gotoSchool(); ch1.getCandy(); } } class Child{ String s; int i; Child(String s, int i){ this.s=s; this.i=i; } Child(String s){ this.s=s; } void gotoSchool(){ System.out.println(i+"학년인"+s+"가 학교에간다"); } void getCandy(){ System.out.printl.. 2007. 1. 31.
자바초급 수업 2일제 메서드 생성자 정의 String str="abcd"; int i=str.indexof("bc"); class String{ int indexof(String str1){ } } ----------------------------------------- String str="abcd"; char[] arr=str.tocharArray(); for(int i=0 ; i 2007. 1. 31.
자바 기초 로직을 알아보자... class [클래스명]{ [리턴형][메서드명]([매개변수]){ 주소.멤버변수명 주소.메서드(); } } ex) class Test1{ void kk(){ } int kkk(int i){ return i } } class Test{ public static void main(){ Test1 t=new Test1 t.kk() String re=t.kkkk(10) } } 2007. 1. 30.
잔돈계산-- Mr.Blog...여러분들은 여유시간에 보고 또 보게 되는 드라마가 있나요? 블로그씨는 집에 있는 시간에 "발리에서 생긴 일"을 다시 보곤 해요~ 루니암(kihong85)...class Ja{ public static void main(String args[]){ int a=Integer.parseInt(args[0]); int b=Integer.parseInt(args[1]); int s=a-b; int c,d,e,f,g,h; c=d=e=f=g=h=0; c=s/5000; h=s%5000; d=h/1000; h=h%1000; e=h/500; h=h%500; f=h/100; h=h%100; g=h/50; h=h%50; h=h/10; System.out.println("손님이지불한금액 ="+a); Syste.. 2007. 1. 23.
아이프레임으로 달력 만들기 "+tagnamelist[i]+""; if(i!=tagnamelist.length-1) { convertHTML += ", "; } } document.getElementById("tagviewtd").innerHTML = convertHTML; document.getElementById("tagview").style.display = ""; document.getElementById("tagedit").style.disp.. 2007. 1. 23.