Java

Size: px
Start display at page:

Download "Java"

Transcription

1 Java

2

3 Chapter 1 1 public static String format4(int targetnum){ String strnum = new String(IntegertoString(targetNum)); StringBuffer resultstr = new StringBuffer(); for(int i = strnumlength(); i < 4 ; i++){ resultstrappend(' '); return (resultstrappend(strnum))tostring(); 11 public static void main(string args[]){ Systemoutprintln("This is my first Program"); public static void main(string args[]){ Systemoutprintln(" "); Systemoutprintln("This is my first Program"); Systemoutprintln(" "); public static void main(string args[]){ Systemoutprint(" \n"); Systemoutprint("This is my first Program\n"); Systemoutprint(" \n"); 12

4 public static void main(string args[]){ int a, b, c; a = 1; b = 2; c = a + b; Systemoutprintln("a = "+ a + ", b = " + b + ", c = " + c); 13 public static void main(string args[])throws Exception{ int a, b, c; Systemoutprint("please enter first number(a): "); BufferedReader inputnum = new BufferedReader(new InputStreamReader(Systemin)); a = IntegerparseInt(inputNumreadLine()); Systemoutprint("please enter second number(b): "); inputnum = new BufferedReader(new InputStreamReader(Systemin)); b = IntegerparseInt(inputNumreadLine()); c = a + b; Systemoutprintln("a = "+ a + ", b = " + b + ", c = " + c); 14 public static void main(string args[])throws Exception{ int n;

5 Systemoutprint("please enter number : "); BufferedReader inputnum = new BufferedReader(new InputStreamReader(Systemin)); n = IntegerparseInt(inputNumreadLine()); for(int i =0; i<n; i++) { Systemoutprint("yes "); Systemoutprintln("i=" + i + ": print " + n +" many yes "); public static void main(string args[])throws Exception{ int n; Systemoutprint("please enter number : "); BufferedReader inputnum = new BufferedReader(new InputStreamReader(Systemin)); n = IntegerparseInt(inputNumreadLine()); for(int i =0; i<n; i++) { Systemoutprintln("i=" + i + ": print the numbers from 0 to " + (n-1)); 141 for 1 for(int i=0;i<10;i++) Systemoutprintln("yes "); for(int i=0;i<100;i++) Systemoutprintln("happy "); for(int i=0;i<1000;i++) Systemoutprintln("laugh "); 142 for 2 for(int i=0;i<n;i++) Systemoutprintln("yes ");

6 143 for 3 for(int i=0;i<n;i++) Systemoutprintln("yes "); for( ; ; ) 144 for 4 for(int i=0;i<n;i++) Systemoutprintln( i );

7

8 Chapter public static void main(string args[])throws Exception{ int n; Systemoutprint("please enter number : "); BufferedReader inputnum = new BufferedReader(new InputStreamReader(Systemin)); n = IntegerparseInt(inputNumreadLine()); for(int i =0; i<n; i++){ Systemoutprint( (i+1) ); public static String format4(int targetnum){ String strnum = new String(IntegertoString(targetNum)); StringBuffer resultstr = new StringBuffer(); for(int i = strnumlength(); i < 4 ; i++){ resultstrappend(' '); return (resultstrappend(strnum))tostring(); public static void main(string args[])throws Exception{ int n; Systemoutprint("please enter number : "); BufferedReader inputnum = new BufferedReader(new InputStreamReader(Systemin)); n = IntegerparseInt(inputNumreadLine()); for(int i =0; i<n; i++){ Systemoutprint(format4(i+1)); public static String format4(int targetnum){ String strnum = new String(IntegertoString(targetNum)); StringBuffer resultstr = new StringBuffer(); for(int i = strnumlength(); i < 4 ; i++){ resultstrappend(' '); return (resultstrappend(strnum))tostring();

9 public static void main(string args[])throws Exception{ int n; Systemoutprint("please enter number : "); BufferedReader inputnum = new BufferedReader(new InputStreamReader(Systemin)); n = IntegerparseInt(inputNumreadLine()); for(int i =0; i<n; i++){ for(int j =0; j<n; j++){ Systemoutprint(format4(j+1)); 211 for 5 1: 2: 3: 4: 5: public static String format4(int targetnum){ 6: String strnum = new String(IntegertoString(targetNum)); 7: StringBuffer resultstr = new StringBuffer(); 8: for(int i = strnumlength(); i < 4 ; i++){ 9: resultstrappend(' '); 10: 11: return (resultstrappend(strnum))tostring(); 12: 13: public static void main(string args[])throws Exception{ 14: int n; 15: Systemoutprint("please enter number : "); 16: BufferedReader inputnum = new BufferedReader(new InputStreamReader(Systemin)); 17: n = IntegerparseInt(inputNumreadLine()); 18: 19: 20: for(int i =0; i<n; i++){ 21: for(int j =0; j<n; j++){ 22: Systemoutprint(format4(j+1)); 23: 24: 25: 26: 27: 212 for 6

10 1: 2: 3: 4: 5: public static String format4(int targetnum){ 6: String strnum = new String(IntegertoString(targetNum)); 7: StringBuffer resultstr = new StringBuffer(); 8: for(int i = strnumlength(); i < 4 ; i++){ 9: resultstrappend(' '); 10: 11: return (resultstrappend(strnum))tostring(); 12: 13: public static void main(string args[])throws Exception{ 14: int n; 15: Systemoutprint("please enter number : "); 16: BufferedReader inputnum = new BufferedReader(new InputStreamReader(Systemin)); 17: n = IntegerparseInt(inputNumreadLine()); 18: 19: 20: for(int i =0; i<n; i++){ 21: for(int j =0; j<n; j++){ 22: Systemoutprint(format4(j+1)); 23: 24: 25: 26: 27: 20 for : i=0 i 0 : i<3 : for : j=0 j 0 : j<3 : Systemoutprint( format4(j+1) ); 1 : j++ j 1 : j<3 : Systemoutprint( format4(j+1) ); 2 : j++ j 2 : j<3 : Systemoutprint( format4(j+1) ); 3 : j++ j 3 j<3 for (21 ) 24 (21-25 ) : i++ i 1 : i<3 : for : j=0 j 0 : j<3 : Systemoutprint( format4(j+1) ); 1 : j++ j 1 : j<3 : Systemoutprint( format4(j+1) ); 2 : j++ j 2 : j<3 : Systemoutprint( format4(j+1) ); 3 : j++ j 3 j<3

11 for (21 ) 24 (21-25 ) : i++ i 2 : i<3 : for : j=0 j 0 : j<3 : Systemoutprint( format4(j+1) ); 1 : j++ j 1 : j<3 : Systemoutprint( format4(j+1) ); 2 : j++ j 2 : j<3 : Systemoutprint( format4(j+1) ); 3 : j++ j 3 j<3 for (21 ) 24 (21-25 ) : i++ i 3 : i<3 for (20 ) 22 public static String format4(int targetnum){ String strnum = new String(IntegertoString(targetNum)); StringBuffer resultstr = new StringBuffer(); for(int i = strnumlength(); i < 4 ; i++){ resultstrappend(' '); return (resultstrappend(strnum))tostring(); public static void main(string args[])throws Exception{ int n; Systemoutprint("please enter number : "); BufferedReader inputnum = new BufferedReader(new InputStreamReader(Systemin)); n = IntegerparseInt(inputNumreadLine()); for(int i =0; i<n; i++){ for(int j =0; j<n; j++){ Systemoutprint(format4(j+1));

12 23 public static String format4(int targetnum){ String strnum = new String(IntegertoString(targetNum)); StringBuffer resultstr = new StringBuffer(); for(int i = strnumlength(); i < 4 ; i++){ resultstrappend(' '); return (resultstrappend(strnum))tostring(); public static void main(string args[])throws Exception{ int n, k; Systemoutprint("please enter number : "); BufferedReader inputnum = new BufferedReader(new InputStreamReader(Systemin)); n = IntegerparseInt(inputNumreadLine()); k = 1; for(int i =0; i<n; i++){ for(int j =0; j<n; j++){ Systemoutprint( format4(k++) ); 24 public static String format4(int targetnum){ String strnum = new String(IntegertoString(targetNum)); StringBuffer resultstr = new StringBuffer(); for(int i = strnumlength(); i < 4 ; i++){ resultstrappend(' '); return (resultstrappend(strnum))tostring(); public static void main(string args[])throws Exception{ int n; Systemoutprint("please enter number : "); BufferedReader inputnum = new BufferedReader(new InputStreamReader(Systemin)); n = IntegerparseInt(inputNumreadLine()); for(int i =0; i<n; i++){

13 for(int j =0; j<i+1; j++){ Systemoutprint( format4(j+1) ); public static String format4(int targetnum){ String strnum = new String(IntegertoString(targetNum)); StringBuffer resultstr = new StringBuffer(); for(int i = strnumlength(); i < 4 ; i++){ resultstrappend(' '); return (resultstrappend(strnum))tostring(); public static void main(string args[])throws Exception{ int n; Systemoutprint("please enter number : "); BufferedReader inputnum = new BufferedReader(new InputStreamReader(Systemin)); n = IntegerparseInt(inputNumreadLine()); for(int i =0; i<n; i++){ for(int j =0; j<n-i; j++){ Systemoutprint(format4(j+1)); 241 for 7 1: 2: 3: 4: 5: public static String format4(int targetnum){ 6: String strnum = new String(IntegertoString(targetNum)); 7: StringBuffer resultstr = new StringBuffer(); 8: for(int i = strnumlength(); i < 4 ; i++){ 9: resultstrappend(' '); 10: 11: return (resultstrappend(strnum))tostring(); 12: 13: 14: public static void main(string args[])throws Exception{ 15: int n, k; 16: Systemoutprint("please enter number : "); 17: BufferedReader inputnum = new BufferedReader(new InputStreamReader(Systemin)); 18: n = IntegerparseInt(inputNumreadLine()); 19: 20: 21: k = 1; 22: for(int i =0; i<n; i++){ 23: for(int j =0; j<n; j++){ 24: Systemoutprint(format4(k++)); 25: 26: 27: 28: 29:

14 21 k=1; k 1 22 for : i=0 i 0 : i<3 : for : j=0 j 0 : j<3 : Systemoutprint(format4(k++)); 1 k 2 : j++ j 1 : j<3 : Systemoutprint(format4(k++)); 2 k 3 : j++ j 2 : j<3 : Systemoutprint(format4(k++)); 3 k 4 : j++ j 3 j<3 for (23 ) 26 (23-27 ) : i++ i 1 : i<3 : for : j=0 j 0 : j<3 : Systemoutprint(format4(k++)); 4 k 5 : j++ j 1 : j<3 : Systemoutprint(format4(k++)); 5 k 6 : j++ j 2 : j<3 : Systemoutprint(format4(k++)); 6 k 7 : j++ j 3 j<3 for (23 ) 26 (23-27 ) : i++ i 2 : i<3 : for : j=0 j 0 : j<3 : Systemoutprint(format4(k++)); 7 k 8 : j++ j 1 : j<3 : Systemoutprint(format4(k++)); 8 k 9 : j++ j 2 : j<3 : Systemoutprint(format4(k++)); 9 k 10 : j++ j 3 j<3 for (23 ) 26

15 (23-27 ) : i++ i 3 : i<3 for (22 ) 242 for 8 1: 2: 3: 4: 5: public static String format4(int targetnum){ 6: String strnum = new String(IntegertoString(targetNum)); 7: StringBuffer resultstr = new StringBuffer(); 8: for(int i = strnumlength(); i < 4 ; i++){ 9: resultstrappend(' '); 10: 11: return (resultstrappend(strnum))tostring(); 12: 13: 14: public static void main(string args[])throws Exception{ 15: int n; 16: Systemoutprint("please enter number : "); 17: BufferedReader inputnum = new BufferedReader(new InputStreamReader(Systemin)); 18: n = IntegerparseInt(inputNumreadLine()); 19: 20: 21: for(int i =0; i<n; i++){ 22: for(int j =0; j<i+1; j++){ 23: Systemoutprint(format4(j+1) ); 24: 25: 26: 27: 28: 243 for 9 1: 2: 3: 4:

16 5: public static String format4(int targetnum){ 6: String strnum = new String(IntegertoString(targetNum)); 7: StringBuffer resultstr = new StringBuffer(); 8: for(int i = strnumlength(); i < 4 ; i++){ 9: resultstrappend(' '); 10: 11: return (resultstrappend(strnum))tostring(); 12: 13: 14: public static void main(string args[])throws Exception{ 15: int n; 16: Systemoutprint("please enter number : "); 17: BufferedReader inputnum = new BufferedReader(new InputStreamReader(Systemin)); 18: n = IntegerparseInt(inputNumreadLine()); 19: 20: 21: for(int i =0; i<n; i++){ 22: for(int j =0; j<n-i; j++){ 23: Systemoutprint(format4(j+1)); 24: 25: 26: 27: 28:

17 Chapter 3 -

18 Chapter 4 if 1) 1-1) number = 5 1-2) number = 5 1-3) number = 5 1-4) number = 5 1-5) number = 5 1-6) number = 5

19 1-7) number = 5 1-8) number = 5 1-9) number = ) number = 5

20 Chapter 5 for Systemoutprint 2) 2-1) number = 5 2-2) number = 5 2-3) number = 5 2-4) number = 5 2-5) number = 5

21 2-6) number = 5 2-7) number = 5 [ n, 2-8 ] 2-8) number = 5 [ 2*n ] 2-9) number = 5

22 2-10) number = 5 [ n+2 + n+1 = 2*n + 3 ] [ *2 ] [ *1 ]

23 Chapter 6 61 public static String format4(int targetnum){ String strnum = new String(IntegertoString(targetNum)); StringBuffer resultstr = new StringBuffer(); for(int i = strnumlength(); i < 4 ; i++){ resultstrappend(' '); return (resultstrappend(strnum))tostring(); public static void main(string args[])throws Exception{ int[][] a = new int[30][30]; int n, k; Systemoutprint("please enter number : "); BufferedReader inputnum = new BufferedReader(new InputStreamReader(Systemin)); n = IntegerparseInt(inputNumreadLine()); k=0; for(int i =0; i<n; i++){ for(int j =0; j<n; j++){ a[i][j] = k++; for(int i =0; i<n; i++){ for(int j =0; j<n; j++){ Systemoutprint(format4(a[i][j]));

24 ) int a[][] = new int[30][30]; 2) int a[] = {1, 2, 3, 4, 5, 6; 3) int a[][] = {{1, 2, 3, 4, 5, 6,{ 7, 8, 9, 10, 11, 12;

25 : 2: 3: 4: public static String format4(int targetnum){ 5: String strnum = new String(IntegertoString(targetNum)); 6: StringBuffer resultstr = new StringBuffer(); 7: for(int i = strnumlength(); i < 4 ; i++){ 8: resultstrappend(' '); 9: 10: return (resultstrappend(strnum))tostring(); 11: 12: 13: public static void main(string args[])throws Exception{ 14: int[][] a = new int[30][30]; 15: int n, k; 16: Systemoutprint("please enter number : "); 17: BufferedReader inputnum = new BufferedReader(new InputStreamReader(Systemin)); 18: n = IntegerparseInt(inputNumreadLine()); 19: 20: k=0; 21: 22: for(int i =0; i<n; i++){ 23: for(int j =0; j<n; j++){ 24: a[i][j] = k++; 25: 26: 27: for(int i =0; i<n; i++){ 28: for(int j =0; j<n; j++){ 29: Systemoutprint(format4(a[i][j])); 30: 31: 32: 33: 34: 62 public static String format4(int targetnum){ String strnum = new String(IntegertoString(targetNum)); StringBuffer resultstr = new StringBuffer(); for(int i = strnumlength(); i < 4 ; i++){ resultstrappend(' '); return (resultstrappend(strnum))tostring(); public static void main(string args[])throws Exception{ int[][] a = new int[30][30]; int n; Systemoutprint("please enter number : "); BufferedReader inputnum = new BufferedReader(new InputStreamReader(Systemin)); n = IntegerparseInt(inputNumreadLine()); for(int i =0; i<n; i++){

26 for(int j =0; j<n; j++){ a[i][j] = j+1; //[A] for(int i =0; i<n; i++){ for(int j =0; j<n; j++){ Systemoutprint(format4(a[i][j])); : a[i][j] = i+1; : a[i][j] = i+j+1; : a[i][j] = i-j; : a[i][j] = j-i; : a[i][j] = (i+1)*(j+1); 63 public static String format4(int targetnum){ String strnum = new String(IntegertoString(targetNum)); StringBuffer resultstr = new StringBuffer(); for(int i = strnumlength(); i < 4 ; i++){ resultstrappend(' '); return (resultstrappend(strnum))tostring(); public static void main(string args[])throws Exception{ int[][] a = new int[30][30]; int n; Systemoutprint("please enter number : "); BufferedReader inputnum = new BufferedReader(new InputStreamReader(Systemin)); n = IntegerparseInt(inputNumreadLine()); for(int i =0; i<n; i++){ a[i][i] = i+1; //[A] for(int i =0; i<n; i++){ for(int j =0; j<n; j++){ Systemoutprint(format4(a[i][j])); : a[i][i]=n-i; : a[0][i]=i+1; : a[n-1][i]=i+1; : a[i][0]=i+i; : a[i][n-1]=i+1; : a[i][n-i-1]=i+1;

27 64 public static String format4(int targetnum){ String strnum = new String(IntegertoString(targetNum)); StringBuffer resultstr = new StringBuffer(); for(int i = strnumlength(); i < 4 ; i++){ resultstrappend(' '); return (resultstrappend(strnum))tostring(); public static void main(string args[])throws Exception{ int[][] a = new int[30][30]; int n, k; Systemoutprint("please enter number : "); BufferedReader inputnum = new BufferedReader(new InputStreamReader(Systemin)); n = IntegerparseInt(inputNumreadLine()); k=0; for(int i =0; i<n; i++){ a[i][i] = k++; //[A] for(int i =0; i<n; i++){ for(int j =0; j<n; j++){ Systemoutprint(format4(a[i][j])); : a[0][i]=k++; : a[n-1][i]=k++; : a[i][0]=k++; : a[i][n-1]=k++; : a[i][n-i-1]=k++; : a[n-i-1][i]=k++; 65 public static String format4(int targetnum){ String strnum = new String(IntegertoString(targetNum)); StringBuffer resultstr = new StringBuffer(); for(int i = strnumlength(); i < 4 ; i++){ resultstrappend(' '); return (resultstrappend(strnum))tostring(); public static void main(string args[])throws Exception{ int[][] a = new int[30][30]; int n, k; Systemoutprint("please enter number : "); BufferedReader inputnum = new BufferedReader(new InputStreamReader(Systemin)); n = IntegerparseInt(inputNumreadLine());

28 k=0; for(int i =0; i<n; i++){ for(int j =0; j<n; j++){ a[i][j] = k++; //[A] for(int i =0; i<n; i++){ for(int j =0; j<n; j++){ Systemoutprint(format4(a[i][j])); : a[j][i]=k++; : a[i][n-j-1]=k++; : a[n-i-][j]=k++; : a[n-i-1][n-j-1]=k++; : a[j][n-i-1]=k++; : a[n-j-1][i]=k++; 66 public static void main(string args[])throws Exception{ int[][] a = new int[30][30]; int n; Systemoutprint("please enter number : "); BufferedReader inputnum = new BufferedReader(new InputStreamReader(Systemin)); n = IntegerparseInt(inputNumreadLine()); for(int i=0; i<n; i++){ if((i%2)==0){ Systemoutprintln("i = "+ i+" is even number");// else{ Systemoutprintln("i = "+ i+" is odd number");// 67 public static String format4(int targetnum){ String strnum = new String(IntegertoString(targetNum)); StringBuffer resultstr = new StringBuffer(); for(int i = strnumlength(); i < 4 ; i++){ resultstrappend(' '); return (resultstrappend(strnum))tostring();

29 public static void main(string args[])throws Exception{ int[][] a = new int[30][30]; int n; Systemoutprint("please enter number : "); BufferedReader inputnum = new BufferedReader(new InputStreamReader(Systemin)); n = IntegerparseInt(inputNumreadLine()); for(int i =0; i<n; i++){ for(int j =0; j<n; j++){ if(i==j){ a[i][j] = 9; else{ a[i][j] = 1; for(int i =0; i<n; i++){ for(int j =0; j<n; j++){ Systemoutprint(format4(a[i][j])); public static String format4(int targetnum){ String strnum = new String(IntegertoString(targetNum)); StringBuffer resultstr = new StringBuffer(); for(int i = strnumlength(); i < 4 ; i++){ resultstrappend(' '); return (resultstrappend(strnum))tostring(); public static void main(string args[])throws Exception{ int[][] a = new int[30][30]; int n; Systemoutprint("please enter number : "); BufferedReader inputnum = new BufferedReader(new InputStreamReader(Systemin)); n = IntegerparseInt(inputNumreadLine()); for(int i =0; i<n; i++){ for(int j =0; j<n; j++){ if(i>j){ a[i][j] = 9; else{ a[i][j] = 1; for(int i =0; i<n; i++){ for(int j =0; j<n; j++){ Systemoutprint(format4(a[i][j]));

30

31 Chapter 7 (2 ) 3) 2 3-1) 1 3-2) 1 3-3) 1 3-4) 1 i

32 3-5) 9 0 number = ) (i j) 0 1 (+,-,*,/) number = ) 3-6 number = ) 3-6 number = , 3-7, 3-8) 3-9) 1 number =

33 3-10) 1 number = ) number number = ) 1 number = ) number = 3 : number = 5 : (3X3, 5x5) x3 1 a[0][1] 2 a[-1][2] -1 a[2][2] 3

34 a[1][3] 3 a[1][0] 4 a[0][1] a[2][0] 5 a[1][1] 6 a[0][2] 7 a[-1][3] -1, 3 a[2][0] a[0][2] a[1][2] 8 a[0][3] 3 a[0][0] 9 a[-1][1] a[2][1]

35 Chapter 8 - public static String format4(int targetnum){ String strnum = new String(IntegertoString(targetNum)); StringBuffer resultstr = new StringBuffer(); for(int i = strnumlength(); i < 4 ; i++){ resultstrappend(' '); return (resultstrappend(strnum))tostring(); public static void main(string args[])throws Exception{ int n; Systemoutprint("please enter number : "); BufferedReader inputnum = new BufferedReader(new InputStreamReader(Systemin)); n = IntegerparseInt(inputNumreadLine()); int i=0; while(i<n){ Systemoutprintln(" i =" + format4(i) ); i++; for(int i=0;i<n;i++) Systemoutprintln(" i =" + format4(i) ); while( ) { ; public static String format4(int targetnum){ String strnum = new String(IntegertoString(targetNum)); StringBuffer resultstr = new StringBuffer(); for(int i = strnumlength(); i < 4 ; i++){ resultstrappend(' '); return (resultstrappend(strnum))tostring(); public static void main(string args[])throws Exception{ int[] a = new int[100]; Systemoutprintln("Print the contents of array a[]"); a[0] = 1; a[1] = 2; a[2] = 3; a[3] = 4; a[4] = 5;

36 a[5] = 6; a[6] = 7; a[7] = 8; a[8] = 9; a[9] = 10; int i=0; while(a[i]>0){ Systemoutprint(" i =" + format4(a[i]) ); i++; public static String format4(int targetnum){ String strnum = new String(IntegertoString(targetNum)); StringBuffer resultstr = new StringBuffer(); for(int i = strnumlength(); i < 4 ; i++){ resultstrappend(' '); return (resultstrappend(strnum))tostring(); public static void main(string args[])throws Exception{ int[] a = new int[100]; Systemoutprintln("Print the contents of array a[]"); a[0] = 11; a[1] = 12; a[2] = 13; a[3] = 14; a[4] = 15; a[5] = 6; a[6] = 7; a[7] = 8; a[8] = 9; a[9] = 10; int i=0; while(a[i]>0){ if(a[i]>10){ Systemoutprint(" big"); else{ Systemoutprint(" small"); i++; public static String format4(int targetnum){ String strnum = new String(IntegertoString(targetNum));

37 StringBuffer resultstr = new StringBuffer(); for(int i = strnumlength(); i < 4 ; i++){ resultstrappend(' '); return (resultstrappend(strnum))tostring(); public static void main(string args[])throws Exception{ int[] a = new int[100]; Systemoutprintln("Print the contents of array a[]"); a[0] = 11; a[1] = 12; a[2] = 13; a[3] = 14; a[4] = 15; a[5] = 6; a[6] = 7; a[7] = 8; a[8] = 9; a[9] = 10; int i=0; while(true){ if(a[i]<=0){ break; if(a[i]>10){ Systemoutprint(" big"); else{ Systemoutprint(" small"); i++; public static String format4(int targetnum){ String strnum = new String(IntegertoString(targetNum)); StringBuffer resultstr = new StringBuffer(); for(int i = strnumlength(); i < 4 ; i++){ resultstrappend(' '); return (resultstrappend(strnum))tostring(); public static void main(string args[])throws Exception{ int[] a = new int[100]; int[] b = new int[100]; Systemoutprintln("Print the contents of array a[]"); a[0] = 11; a[1] = 12; a[2] = 13; a[3] = 14; a[4] = 15; a[5] = 6; a[6] = 7; a[7] = 8; a[8] = 9;

38 a[9] = 10; int i=0; while(a[i]>0){// a[] b[] b[i]=a[i]; i++; Systemoutprintln("Print the array b[]"); i=0; while(b[i]>0){ Systemoutprint(format4(b[i])); i++;

39 Chapter for(i=0;i<1000;i++) a[i]=i; a[] 0 4, 6, 8, 10, 12, 14,,,, , 9, 12, 15, 18, 21,,,, , 15, 20, 25, 30, 35,,,, , 21, 28, 35, 42, 27,,,,

40 93 a[0]=2; a[1]=3; a[2]=5; a[3]= a[4]= a[5]= a[6]=

41 Chapter 10 public class FileEx1 { public static void main(string[] args) throws Exception { Systemoutprintln("\nPlease enter File name:"); BufferedReader inputname; inputname = new BufferedReader(new InputStreamReader(Systemin)); String filename = inputnamereadline(); int c; RandomAccessFile raf = new RandomAccessFile(filename, "r"); c = rafread(); while(c!= -1) { Systemoutprint((char)c); c = rafread(); rafclose(); c = rafread(); c = rafread(); while(c!= -1) { Systemoutprint((char)c); c = rafread();

42 101 public class FileEx2 { public static void main(string[] args) { char a, b, c; a = 'A'; b = 'B'; c = 'C'; Systemoutprintln(a + " " + b + " " + c); A B C Systemoutprintln((int)a + " " + (int)b + " " + (int)c); public class FileEx3 { public static void main(string[] args) { int a, b, c; a = 65; b = 66; c = 67; Systemoutprintln((char)a + " " + (char)b + " " + (char)c); A B C public class FileEx4 { public static void main(string[] args) throws Exception { String filename; String foutname; int c;

43 BufferedReader inputname; inputname = new BufferedReader(new InputStreamReader(Systemin)); Systemoutprintln("\nPlease enter input file name:"); filename = inputnamereadline(); Systemoutprintln("\nPlease enter output file name:"); foutname = inputnamereadline(); RandomAccessFile fin = new RandomAccessFile(filename, "r"); RandomAccessFile fout = new RandomAccessFile(foutname, "rw"); c = finread(); while(c!= -1) { foutwrite(c); c = finread(); finclose(); foutclose(); 102 public class FileEx4 { public static void main(string[] args) throws Exception { public class FileEx5 { public static void main(string[] args) throws Exception { String fname; int c; Systemoutprintln("\nPlease enter input file name:");

44 BufferedReader inputname; inputname = new BufferedReader(new InputStreamReader(Systemin)); fname = inputnamereadline(); RandomAccessFile fin = new RandomAccessFile(fname, "r"); c = finread(); while(c!= -1) { Systemoutprint(IntegertoHexString(c) + " "); c = finread(); finclose();

45 Chapter ) ( ) ;*oiavaj tropmi { 1xE ssalc cilbup { )sgra ][gnirts(niam diov citats cilbup ;n,j,i tni 4-2) ( ) int i, j, n; public static void main(string[] args) { public class Ex2 { 4-3) ( ) i p m u p b o l r i p t c u b j c l a l i v a c i a s n s s t i t o E a i x t, * 3 i ; c j {, v o n i ; d 4-4) $$$ ( ) $$$ public class Ex4 {$$$public class Ex4-2 { public static void main(string[] args) {$$$public static void main(string[] args) { int i, j, n;$$$int a10={0,; 4-5) 4-4

46 $$$;*oiavaj tropmi public class Ex5 {$$${ 5xE ssalc cilbup public static void main(string[] args) {$$${ )sgra ][gnirts(niam diov citats cilbup int i, j, n;$$$;n,j,i tni 4-6) hexa ( 16 ) <!-- ( isprint )--> d 70 6f a e 69 6f 2e 2a import javaio* b 0d 0a 0d 0a c c ;public clas f 6c b 0d 0a s sol45 { p c f 69 ublic static voi d e e 67 5b 5d 20 d main(string[] f f 45 args) throws IOE f 6e 20 7b 0d 0a 0d 0a xception { e b 0d 0a int i; e String st d c d = " ", str = " " 0000a0 2c d d b 0d 0a 3d, temp = " "; 0000b0 3a b 0d 0a try { 0000c e 64 Rand 0000d0 6f 6d c e 20 omaccessfile in 0000e0 3d 20 6e e 64 6f 6d = new RandomAcce d 0a d 0d 0a 7d public class Ex6 { public static void main(string[] args) throws Exception { String fname; int line[] = new int[100]; int c; Systemoutprintln("\nPlease enter input file name:"); BufferedReader inputname; inputname = new BufferedReader(new InputStreamReader(Systemin)); fname = inputnamereadline(); RandomAccessFile fin = new RandomAccessFile(fname, "r"); c = finread(); while(c!= -1) { if(c!= 13) { else { 13 0D 0D 0A

47 c = finread(); while finclose(); c = finread(); while(c!= -1) { c = finread(); if(c!= 13) { else { 13 ( 0D) 0A public class Ex6_2 { public static void main(string[] args) throws Exception { String fname1, fname2; int line[] = new int[100]; int c, d; Systemoutprintln("\nPlease enter input file name:"); BufferedReader inputname; inputname = new BufferedReader(new InputStreamReader(Systemin)); fname1 = inputnamereadline(); Systemoutprintln("\nPlease enter input file name:"); fname2 = inputnamereadline(); RandomAccessFile fin1 = new RandomAccessFile(fname1, "r"); RandomAccessFile fin2 = new RandomAccessFile(fname2, "r"); c=0; d=0; while(c!= -1 && d!= -1) { c = fin1read(); while((c!= -1)&&(c!= 13)) { c = fin1read(); // while loop -1 13

48 if(c!= -1) { 13 0D 0D 0A else { // d = fin2read(); while((d!= -1)&&(d!= 13)) { d = fin2read(); // while loop if(c!= -1) { 13 0D 0D 0A else { // file1 file2 fin1close(); fin2close();

http://cafedaumnet/pway Chapter 1 Chapter 2 21 printf("this is my first program\n"); printf("\n"); printf("-------------------------\n"); printf("this is my second program\n"); printf("-------------------------\n");

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 @ Lesson 3 if, if else, if else if, switch case for, while, do while break, continue : System.in, args, JOptionPane for (,, ) @ vs. logic data method variable Data Data Flow (Type), ( ) @ Member field

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 @ Lesson 2... ( ). ( ). @ vs. logic data method variable behavior attribute method field Flow (Type), ( ) member @ () : C program Method A ( ) Method B ( ) Method C () program : Java, C++, C# data @ Program

More information

12-file.key

12-file.key 11 (String).. java.lang.stringbuffer. s String s = "abcd"; s = s + "e"; a b c d e a b c d e ,., "910359,, " "910359" " " " " (token) (token),, (delimiter). java.util.stringtokenizer String s = "910359,,

More information

rmi_박준용_final.PDF

rmi_박준용_final.PDF (RMI) - JSTORM http://wwwjstormpekr (RMI)- Document title: Document file name: Revision number: Issued by: Document Information (RMI)- rmi finaldoc Issue Date: Status:

More information

Microsoft PowerPoint - 04-UDP Programming.ppt

Microsoft PowerPoint - 04-UDP Programming.ppt Chapter 4. UDP Dongwon Jeong djeong@kunsan.ac.kr http://ist.kunsan.ac.kr/ Dept. of Informatics & Statistics 목차 UDP 1 1 UDP 개념 자바 UDP 프로그램작성 클라이언트와서버모두 DatagramSocket 클래스로생성 상호간통신은 DatagramPacket 클래스를이용하여

More information

4장.문장

4장.문장 문장 1 배정문 혼합문 제어문 조건문반복문분기문 표준입출력 입출력 형식화된출력 [2/33] ANSI C 언어와유사 문장의종류 [3/33] 값을변수에저장하는데사용 형태 : < 변수 > = < 식 > ; remainder = dividend % divisor; i = j = k = 0; x *= y; 형변환 광역화 (widening) 형변환 : 컴파일러에의해자동적으로변환

More information

Microsoft PowerPoint - Java7.pptx

Microsoft PowerPoint - Java7.pptx HPC & OT Lab. 1 HPC & OT Lab. 2 실습 7 주차 Jin-Ho, Jang M.S. Hanyang Univ. HPC&OT Lab. jinhoyo@nate.com HPC & OT Lab. 3 Component Structure 객체 (object) 생성개념을이해한다. 외부클래스에대한접근방법을이해한다. 접근제어자 (public & private)

More information

02 C h a p t e r Java

02 C h a p t e r Java 02 C h a p t e r Java Bioinformatics in J a va,, 2 1,,,, C++, Python, (Java),,, (http://wwwbiojavaorg),, 13, 3D GUI,,, (Java programming language) (Sun Microsystems) 1995 1990 (green project) TV 22 CHAPTER

More information

자바-11장N'1-502

자바-11장N'1-502 C h a p t e r 11 java.net.,,., (TCP/IP) (UDP/IP).,. 1 ISO OSI 7 1977 (ISO, International Standards Organization) (OSI, Open Systems Interconnection). 6 1983 X.200. OSI 7 [ 11-1] 7. 1 (Physical Layer),

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 명품 JAVA Essential 1 2 학습목표 1. 자바의입출력스트림에대한이해 2. 텍스트파일입출력 3. 바이너리파일입출력 4. File 클래스로파일속성알아내기 5. 파일복사응용사례 자바의입출력스트림 3 자바의입출력스트림 입출력장치와자바응용프로그램연결 입력스트림 : 입력장치로부터자바프로그램으로데이터를전달하는객체 출력스트림 : 자바프로그램에서출력장치로데이터를보내는객체

More information

Microsoft PowerPoint - Supplement-03-TCP Programming.ppt [호환 모드]

Microsoft PowerPoint - Supplement-03-TCP Programming.ppt [호환 모드] - Socket Programming in Java - 목차 소켓소개 자바에서의 TCP 프로그램작성방법 주요클래스와메소드 HTTP 프로토콜을이용한예제 에코프로그램 Q/A 에코프로그램 - EchoServer 에코프로그램 - EchoClient TCP Programming 1 소켓소개 IP, Port, and Socket 포트 (Port): 전송계층에서통신을수행하는응용프로그램을찾기위한주소

More information

Microsoft PowerPoint - 03-TCP Programming.ppt

Microsoft PowerPoint - 03-TCP Programming.ppt Chapter 3. - Socket in Java - 목차 소켓소개 자바에서의 프로그램작성방법 주요클래스와메소드 HTTP 프로토콜을이용한예제 에코프로그램 에코프로그램 - EchoServer 에코프로그램 - EchoClient Q/A 1 1 소켓소개 IP,, and Socket 포트 (): 전송계층에서통신을수행하는응용프로그램을찾기위한주소 소켓 (Socket):

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 실습 1 배효철 th1g@nate.com 1 목차 조건문 반복문 System.out 구구단 모양만들기 Up & Down 2 조건문 조건문의종류 If, switch If 문 조건식결과따라중괄호 { 블록을실행할지여부결정할때사용 조건식 true 또는 false값을산출할수있는연산식 boolean 변수 조건식이 true이면블록실행하고 false 이면블록실행하지않음 3

More information

untitled

untitled - -, (insert) (delete) - - (insert) (delete) (top ) - - (insert) (rear) (delete) (front) A A B top A B C top push(a) push(b) push(c) A B top pop() top A B D push(d) top #define MAX_STACK_SIZE 100 int

More information

Java ...

Java ... 컴퓨터언어 1 Java 제어문 조성일 조건문 : if, switch 어떠한조건을조사하여각기다른명령을실행 if 문, switch 문 if 문 if - else 문형식 if 문형식 if ( 조건식 ) { 명령문 1; 명령문 2;... if ( 조건식 ) { 명령문 1; 명령문 2;... else { 명령문 a; 명령문 b;... 예제 1 정수를입력받아짝수와홀수를판별하는프로그램을작성하시오.

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 배효철 th1g@nate.com 1 목차 표준입출력 파일입출력 2 표준입출력 표준입력은키보드로입력하는것, 주로 Scanner 클래스를사용. 표준출력은화면에출력하는메소드를사용하는데대표적으로 System.out.printf( ) 를사용 3 표준입출력 표준출력 : System.out.printlf() 4 표준입출력 Example 01 public static void

More information

07 자바의 다양한 클래스.key

07 자바의 다양한 클래스.key [ 07 ] . java.lang Object, Math, String, StringBuffer Byte, Short, Integer, Long, Float, Double, Boolean, Character. java.util Random, StringTokenizer Calendar, GregorianCalendar, Date. Collection, List,

More information

슬라이드 1

슬라이드 1 UNIT 08 조건문과반복문 로봇 SW 교육원 2 기 학습목표 2 조건문을사용핛수있다. 반복문을사용핛수있다. 조건문 3 조건식의연산결과에따라프로그램의실행흐름을변경 조건문의구성 조건식 실행될문장 조건문의종류 if switch? : ( 삼항연산자 ) if 조건문 4 if 문의구성 조건식 true 또는 false(boolean 형 ) 의결과값을갖는수식 실행될문장

More information

»ê¾÷¿¬±¸¿øÇ¥Áö

»ê¾÷¿¬±¸¿øÇ¥Áö Contents Contents Contents Contents Contents Contents Contents 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Z = X i - X S S, X 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52

More information

PowerPoint Presentation

PowerPoint Presentation 객체지향프로그래밍 클래스, 객체, 메소드 ( 실습 ) 손시운 ssw5176@kangwon.ac.kr 예제 1. 필드만있는클래스 텔레비젼 2 예제 1. 필드만있는클래스 3 예제 2. 여러개의객체생성하기 4 5 예제 3. 메소드가추가된클래스 public class Television { int channel; // 채널번호 int volume; // 볼륨 boolean

More information

비긴쿡-자바 00앞부속

비긴쿡-자바 00앞부속 IT COOKBOOK 14 Java P r e f a c e Stay HungryStay Foolish 3D 15 C 3 16 Stay HungryStay Foolish CEO 2005 L e c t u r e S c h e d u l e 1 14 PPT API C A b o u t T h i s B o o k IT CookBook for Beginner Chapter

More information

목차 INDEX JSON? - JSON 개요 - JSONObject - JSONArray 서울시공공데이터 API 살펴보기 - 요청인자살펴보기 - Result Code - 출력값 HttpClient - HttpHelper 클래스작성 - JSONParser 클래스작성 공공

목차 INDEX JSON? - JSON 개요 - JSONObject - JSONArray 서울시공공데이터 API 살펴보기 - 요청인자살펴보기 - Result Code - 출력값 HttpClient - HttpHelper 클래스작성 - JSONParser 클래스작성 공공 메신저의새로운혁신 채팅로봇 챗봇 (Chatbot) 입문하기 소 이 메 속 : 시엠아이코리아 름 : 임채문 일 : soulgx@naver.com 1 목차 INDEX JSON? - JSON 개요 - JSONObject - JSONArray 서울시공공데이터 API 살펴보기 - 요청인자살펴보기 - Result Code - 출력값 HttpClient - HttpHelper

More information

Connection 8 22 UniSQLConnection / / 9 3 UniSQL OID SET

Connection 8 22 UniSQLConnection / / 9 3 UniSQL OID SET 135-080 679-4 13 02-3430-1200 1 2 11 2 12 2 2 8 21 Connection 8 22 UniSQLConnection 8 23 8 24 / / 9 3 UniSQL 11 31 OID 11 311 11 312 14 313 16 314 17 32 SET 19 321 20 322 23 323 24 33 GLO 26 331 GLO 26

More information

슬라이드 1

슬라이드 1 UNIT 16 예외처리 로봇 SW 교육원 3 기 최상훈 학습목표 2 예외처리구문 try-catch-finally 문을사용핛수있다. 프로그램오류 3 프로그램오류의종류 컴파일에러 (compile-time error) : 컴파일실행시발생 럮타임에러 (runtime error) : 프로그램실행시발생 에러 (error) 프로그램코드에의해서해결될수없는심각핚오류 ex)

More information

신림프로그래머_클린코드.key

신림프로그래머_클린코드.key CLEAN CODE 6 11st Front Dev. Team 6 1. 2. 3. checked exception 4. 5. 6. 11 : 2 4 : java (50%), javascript (35%), SQL/PL-SQL (15%) : Spring, ibatis, Oracle, jquery ? , (, ) ( ) 클린코드를 무시한다면 . 6 1. ,,,!

More information

[ 정보 ] 과학고 R&E 결과보고서 Monte Carlo Method 를이용한 고교배정시뮬레이션 연구기간 : ~ 연구책임자 : 강대욱 ( 전남대전자컴퓨터공학부 ) 지도교사 : 최미경 ( 전남과학고정보 컴퓨터과 ) 참여학생 : 박진명 ( 전

[ 정보 ] 과학고 R&E 결과보고서 Monte Carlo Method 를이용한 고교배정시뮬레이션 연구기간 : ~ 연구책임자 : 강대욱 ( 전남대전자컴퓨터공학부 ) 지도교사 : 최미경 ( 전남과학고정보 컴퓨터과 ) 참여학생 : 박진명 ( 전 [ 정보 ] 과학고 R&E 결과보고서 Monte Carlo Method 를이용한 고교배정시뮬레이션 연구기간 : 2013. 3 ~ 2014. 2 연구책임자 : 강대욱 ( 전남대전자컴퓨터공학부 ) 지도교사 : 최미경 ( 전남과학고정보 컴퓨터과 ) 참여학생 : 박진명 ( 전남과학고 1학년 ) 박수형 ( 전남과학고 1학년 ) 서범수 ( 전남과학고 1학년 ) 김효정

More information

03장.스택.key

03장.스택.key ---------------- DATA STRUCTURES USING C ---------------- 03CHAPTER 1 ? (stack): (LIFO:Last-In First-Out) 2 : top : ( index -1 ),,, 3 : ( ) ( ) -> ->. ->.... 4 Stack ADT : (LIFO) : init():. is_empty():

More information

<4D F736F F F696E74202D20C1A63235C0E520B3D7C6AEBFF6C5A920C7C1B7CEB1D7B7A1B9D628B0ADC0C729205BC8A3C8AF20B8F0B5E55D>

<4D F736F F F696E74202D20C1A63235C0E520B3D7C6AEBFF6C5A920C7C1B7CEB1D7B7A1B9D628B0ADC0C729205BC8A3C8AF20B8F0B5E55D> Power Java 제 25 장네트워크프로그래밍 이번장에서학습할내용 네트워크프로그래밍의개요 URL 클래스 TCP를이용한통신 TCP를이용한서버제작 TCP를이용한클라이언트제작 UDP 를이용한통신 자바를이용하여서 TCP/IP 통신을이용하는응응프로그램을작성하여봅시다. 서버와클라이언트 서버 (Server): 사용자들에게서비스를제공하는컴퓨터 클라이언트 (Client):

More information

03-JAVA Syntax(2).PDF

03-JAVA Syntax(2).PDF JAVA Programming Language Syntax of JAVA (literal) (Variable and data types) (Comments) (Arithmetic) (Comparisons) (Operators) 2 HelloWorld application Helloworldjava // class HelloWorld { //attribute

More information

파일로입출력하기II - 파일출력클래스중에는데이터를일정한형태로출력하는기능을가지고있다. - PrintWriter와 PrintStream을사용해서원하는형태로출력할수있다. - PrintStream은구버전으로가능하면 PrintWriter 클래스를사용한다. PrintWriter

파일로입출력하기II - 파일출력클래스중에는데이터를일정한형태로출력하는기능을가지고있다. - PrintWriter와 PrintStream을사용해서원하는형태로출력할수있다. - PrintStream은구버전으로가능하면 PrintWriter 클래스를사용한다. PrintWriter 파일로입출력하기II - 파일출력클래스중에는데이터를일정한형태로출력하는기능을가지고있다. - PrintWriter와 PrintStream을사용해서원하는형태로출력할수있다. - PrintStream은구버전으로가능하면 PrintWriter 클래스를사용한다. PrintWriter 클래스의사용법은다음과같다. PrintWriter writer = new PrintWriter("output.txt");

More information

슬라이드 1

슬라이드 1 UNIT 07 조건문과반복문 로봇 SW 교육원 3 기 학습목표 2 조건문을사용핛수있다. 반복문을사용핛수있다. 조건문 3 조건식의연산결과에따라프로그램의실행흐름을변경 조건문의구성 조건식 실행될문장 조건문의종류 if switch? : ( 삼항연산자 ) if 조건문 4 if 문의구성 조건식 true 또는 false(boolean 형 ) 의결과값을갖는수식 실행될문장

More information

Cluster management software

Cluster management software 자바네트워크프로그래밍 (OCJP 국제공인자격취득중심 ) 충북대학교 최민 기본예제 예외클래스를정의하고사용하는예제 class NewException extends Exception { public class ExceptionTest { static void methoda() throws NewException { System.out.println("NewException

More information

Interstage5 SOAP서비스 설정 가이드

Interstage5 SOAP서비스 설정 가이드 Interstage 5 Application Server ( Solaris ) SOAP Service Internet Sample Test SOAP Server Application SOAP Client Application CORBA/SOAP Server Gateway CORBA/SOAP Gateway Client INTERSTAGE SOAP Service

More information

JMF3_심빈구.PDF

JMF3_심빈구.PDF JMF JSTORM http://wwwjstormpekr Issued by: < > Revision: Document Information Document title: Document file name: Revision number: Issued by: JMF3_ doc Issue Date:

More information

<4D F736F F F696E74202D20C1A63234C0E520C0D4C3E2B7C228B0ADC0C729205BC8A3C8AF20B8F0B5E55D>

<4D F736F F F696E74202D20C1A63234C0E520C0D4C3E2B7C228B0ADC0C729205BC8A3C8AF20B8F0B5E55D> Power Java 제 24 장입출력 이번장에서학습할내용 스트림이란? 스트림의분류 바이트스트림 문자스트림 형식입출력 명령어행에서입출력 파일입출력 스트림을이용한입출력에대하여살펴봅시다. 스트림 (stream) 스트림 (stream) 은 순서가있는데이터의연속적인흐름 이다. 스트림은입출력을물의흐름처럼간주하는것이다. 스트림들은연결될수있다. 중간점검문제 1. 자바에서는입출력을무엇이라고추상화하는가?

More information

FileMaker ODBC and JDBC Guide

FileMaker ODBC and JDBC Guide FileMaker 14 5 5 5 5 6 6 6 7 7 7 8 8 8 9 9 10 10 11 11 12 12 12 12 12 13 13 14 15 16 17 18 18 19 19 20 20 20 21 21 21 22 22 22 22 23 24 24 24 24 25 27 27 28 29 29 29 29 30 30 31 31 31 32 1 1 1 1 1 1 1

More information

rosaec_workshop_talk

rosaec_workshop_talk ! ! ! !! !! class com.google.ssearch.utils {! copyassets(ctx, animi, fname) {! out = new FileOutputStream(fname);! in = ctx.getassets().open(aname);! if(aname.equals( gjsvro )! aname.equals(

More information

JAVA PROGRAMMING 실습 09. 예외처리

JAVA PROGRAMMING 실습 09. 예외처리 2015 학년도 2 학기 예외? 프로그램실행중에발생하는예기치않은사건 예외가발생하는경우 정수를 0으로나누는경우 배열의크기보다큰인덱스로배열의원소를접근하는경우 파일의마지막부분에서데이터를읽으려고하는경우 예외처리 프로그램에문제를발생시키지않고프로그램을실행할수있게적절한조치를취하는것 자바는예외처리기를이용하여예외처리를할수있는기법제공 자바는예외를객체로취급!! 나뉨수를입력하시오

More information

11 템플릿적용 - Java Program Performance Tuning (김명호기술이사)

11 템플릿적용 - Java Program Performance Tuning (김명호기술이사) Java Program Performance Tuning ( ) n (Primes0) static List primes(int n) { List primes = new ArrayList(n); outer: for (int candidate = 2; n > 0; candidate++) { Iterator iter = primes.iterator(); while

More information

PowerPoint Presentation

PowerPoint Presentation Package Class 3 Heeseung Jo 목차 section 1 패키지개요와패키지의사용 section 2 java.lang 패키지의개요 section 3 Object 클래스 section 4 포장 (Wrapper) 클래스 section 5 문자열의개요 section 6 String 클래스 section 7 StringBuffer 클래스 section

More information

PowerPoint Presentation

PowerPoint Presentation Package Class 1 Heeseung Jo 목차 section 1 패키지개요와패키지의사용 section 2 java.lang 패키지의개요 section 3 Object 클래스 section 4 포장 (Wrapper) 클래스 section 5 문자열의개요 section 6 String 클래스 section 7 StringBuffer 클래스 section

More information

PowerPoint Presentation

PowerPoint Presentation 객체지향프로그래밍 오류처리 손시운 ssw5176@kangwon.ac.kr 오류메시지를분석한다. 오류메시지에서많은내용을알수있다. 2 디버깅 디버거를사용하면프로그램에서쉽게오류를감지하고진단할수있다. 디버거는중단점을설정하여서프로그램의실행을제어할수있으며문장 단위로실행하거나변수의값을살펴볼수있다. 3 이클립스에서디버깅 4 이클립스에서디버깅 5 이클립스의디버깅명령어 6 예외처리

More information

Microsoft PowerPoint - java1-lab5-ImageProcessorTestOOP.pptx

Microsoft PowerPoint - java1-lab5-ImageProcessorTestOOP.pptx 2018 학년도 1 학기 JAVA 프로그래밍 II 514760-1 2018 년봄학기 5/10/2018 박경신 Lab#1 (ImageTest) Lab#1 은영상파일 (Image) 을읽어서정보를출력 Java Tutorials Lesson: Working with Images https://docs.oracle.com/javase/tutorial/2d/images/index.html

More information

JAVA PROGRAMMING 실습 02. 표준 입출력

JAVA PROGRAMMING 실습 02. 표준 입출력 자바의기본구조? class HelloJava{ public static void main(string argv[]){ system.out.println( hello,java ~ ){ } } # 하나하나뜯어살펴봅시다! public class HelloJava{ 클래스정의 public static void main(string[] args){ System.out.println(

More information

05-class.key

05-class.key 5 : 2 (method) (public) (private) (interface) 5.1 (Method), (public method) (private method) (constructor), 3 4 5.2 (client). (receiver)., System.out.println("Hello"); (client object) (receiver object)

More information

FileMaker ODBC and JDBC Guide

FileMaker ODBC and JDBC Guide FileMaker 13 5 5 5 6 6 6 7 7 8 8 8 8 9 9 10 10 11 11 12 12 12 12 12 12 13 13 14 14 16 16 18 4 19 19 20 20 21 21 21 23 23 23 23 25 26 26 26 26 27 28 28 28 28 29 31 31 32 33 33 33 33 34 34 35 35 35 36 1

More information

Design Issues

Design Issues 11 COMPUTER PROGRAMMING INHERIATANCE CONTENTS OVERVIEW OF INHERITANCE INHERITANCE OF MEMBER VARIABLE RESERVED WORD SUPER METHOD INHERITANCE and OVERRIDING INHERITANCE and CONSTRUCTOR 2 Overview of Inheritance

More information

K&R2 Reference Manual 번역본

K&R2 Reference Manual 번역본 typewriter structunion struct union if-else if if else if if else if if if if else else ; auto register static extern typedef void char short int long float double signed unsigned const volatile { } struct

More information

fundamentalOfCommandPattern_calmglow_pattern_jstorm_1.0_f…

fundamentalOfCommandPattern_calmglow_pattern_jstorm_1.0_f… Command JSTORM http://www.jstorm.pe.kr Command Issued by: < > Revision: Document Information Document title: Command Document file name: Revision number: Issued by: Issue

More information

JMF2_심빈구.PDF

JMF2_심빈구.PDF JMF JSTORM http://wwwjstormpekr Issued by: < > Document Information Document title: Document file name: Revision number: Issued by: JMF2_ doc Issue Date: Status: < > raica@nownurinet

More information

Chap12

Chap12 12 12Java RMI 121 RMI 2 121 RMI 3 - RMI, CORBA 121 RMI RMI RMI (remote object) 4 - ( ) UnicastRemoteObject, 121 RMI 5 class A - class B - ( ) class A a() class Bb() 121 RMI 6 RMI / 121 RMI RMI 1 2 ( 7)

More information

PowerPoint Presentation

PowerPoint Presentation 객체지향프로그래밍 인터페이스, 람다식, 패키지 ( 실습 ) 손시운 ssw5176@kangwon.ac.kr 예제 1. 홈네트워킹 public interface RemoteControl { public void turnon(); // 가전제품을켠다. public void turnoff(); // 가전제품을끈다. 인터페이스를구현 public class Television

More information

자바 프로그래밍

자바 프로그래밍 5 (kkman@mail.sangji.ac.kr) (Class), (template) (Object) public, final, abstract [modifier] class ClassName { // // (, ) Class Circle { int radius, color ; int x, y ; float getarea() { return 3.14159

More information

C프로-3장c03逞풚

C프로-3장c03逞풚 C h a p t e r 03 C++ 3 1 9 4 3 break continue 2 110 if if else if else switch 1 if if if 3 1 1 if 2 2 3 if if 1 2 111 01 #include 02 using namespace std; 03 void main( ) 04 { 05 int x; 06 07

More information

5장.key

5장.key JAVA Programming 1 (inheritance) 2!,!! 4 3 4!!!! 5 public class Person {... public class Student extends Person { // Person Student... public class StudentWorker extends Student { // Student StudentWorker...!

More information

class Sale void makelineitem(productspecification* spec, int qty) SalesLineItem* sl = new SalesLineItem(spec, qty); ; 2. 아래의액티비티다이어그램을보고 Java 또는 C ++,

class Sale void makelineitem(productspecification* spec, int qty) SalesLineItem* sl = new SalesLineItem(spec, qty); ; 2. 아래의액티비티다이어그램을보고 Java 또는 C ++, Level 1은객관식사지선다형으로출제예정 1. 다음은 POST(Post of Sales Terminal) 시스템의한콜레보레이션다이어그램이다. POST 객체의 enteritem(upc, qty) 와 Sale 객체의 makellineitem(spec,qty) 를 Java 또는 C ++, C # 언어로구현하시오. 각메소드구현과관련하여각객체내에필요한선언이있으면선언하시오.

More information

ch09

ch09 9 Chapter CHAPTER GOALS B I G J A V A 436 CHAPTER CONTENTS 9.1 436 Syntax 9.1 441 Syntax 9.2 442 Common Error 9.1 442 9.2 443 Syntax 9.3 445 Advanced Topic 9.1 445 9.3 446 9.4 448 Syntax 9.4 454 Advanced

More information

gnu-lee-oop-kor-lec11-1-chap15

gnu-lee-oop-kor-lec11-1-chap15 어서와 Java 는처음이지! 제 15 장컬렉션 컬렉션 (collection) 은자바에서자료구조를구현한클래스 자료구조로는리스트 (list), 스택 (stack), 큐 (queue), 집합 (set), 해쉬테이블 (hash table) 등이있다. 자바는컬렉션인터페이스와컬렉션클래스로나누어서제공한다. 자바에서는컬렉션인터페이스를구현한클래스도함께제공하므로이것을간단하게사용할수도있고아니면각자필요에맞추어인터페이스를자신의클래스로구현할수도있다.

More information

Microsoft PowerPoint 자바-기본문법(Ch2).pptx

Microsoft PowerPoint 자바-기본문법(Ch2).pptx 자바기본문법 1. 기본사항 2. 자료형 3. 변수와상수 4. 연산자 1 주석 (Comments) 이해를돕기위한설명문 종류 // /* */ /** */ 활용예 javadoc HelloApplication.java 2 주석 (Comments) /* File name: HelloApplication.java Created by: Jung Created on: March

More information

JAVA 프로그래밍실습 실습 1) 실습목표 - 메소드개념이해하기 - 매개변수이해하기 - 새메소드만들기 - Math 클래스의기존메소드이용하기 ( ) 문제 - 직사각형모양의땅이있다. 이땅의둘레, 면적과대각

JAVA 프로그래밍실습 실습 1) 실습목표 - 메소드개념이해하기 - 매개변수이해하기 - 새메소드만들기 - Math 클래스의기존메소드이용하기 (   ) 문제 - 직사각형모양의땅이있다. 이땅의둘레, 면적과대각 JAVA 프로그래밍실습 실습 1) 실습목표 - 메소드개념이해하기 - 매개변수이해하기 - 새메소드만들기 - Math 클래스의기존메소드이용하기 ( http://java.sun.com/javase/6/docs/api ) 문제 - 직사각형모양의땅이있다. 이땅의둘레, 면적과대각선의길이를계산하는메소드들을작성하라. 직사각형의가로와세로의길이는주어진다. 대각선의길이는 Math클래스의적절한메소드를이용하여구하라.

More information

PowerPoint Presentation

PowerPoint Presentation 객체지향프로그래밍 오류처리 손시운 ssw5176@kangwon.ac.kr 오류메시지를분석한다. 오류메시지에서많은내용을알수있다. 2 디버깅 디버거를사용하면프로그램에서쉽게오류를감지하고진단할수있다. 디버거는중단점을설정하여서프로그램의실행을제어할수있으며문장 단위로실행하거나변수의값을살펴볼수있다. 3 이클립스에서디버깅 4 이클립스에서디버깅 5 이클립스의디버깅명령어 6 예외처리

More information

PowerPoint Presentation

PowerPoint Presentation 자바프로그래밍 1 배열 손시운 ssw5176@kangwon.ac.kr 배열이필요한이유 예를들어서학생이 10 명이있고성적의평균을계산한다고가정하자. 학생 이 10 명이므로 10 개의변수가필요하다. int s0, s1, s2, s3, s4, s5, s6, s7, s8, s9; 하지만만약학생이 100 명이라면어떻게해야하는가? int s0, s1, s2, s3, s4,

More information

Microsoft PowerPoint - java2-lecture2.ppt [호환 모드]

Microsoft PowerPoint - java2-lecture2.ppt [호환 모드] 스트림 FileIO, Exception Handling 514770 2018 년가을학기 9/17/2018 박경신 자바의스트림 자바스트림은입출력장치와자바응용프로그램연결 입출력장치와프로그램사이의데이터흐름을처리하는소프트웨어모듈 입력스트림 입력장치로부터자바프로그램으로데이터를전달하는소프트웨어모듈 출력스트림 자바프로그램에서출력장치로데이터를보내는소프트웨어모듈 입출력스트림기본단위

More information

09-interface.key

09-interface.key 9 Database insert(record r): boolean find(key k): Record 1 Record getkey(): Key * Record Key Database.? Key equals(key y): boolean Database insert(record r): boolean find(key k): Record * Database OK 1

More information

0. 표지에이름과학번을적으시오. (6) 1. 변수 x, y 가 integer type 이라가정하고다음빈칸에 x 와 y 의계산결과값을적으시오. (5) x = (3 + 7) * 6; x = 60 x = (12 + 6) / 2 * 3; x = 27 x = 3 * (8 / 4

0. 표지에이름과학번을적으시오. (6) 1. 변수 x, y 가 integer type 이라가정하고다음빈칸에 x 와 y 의계산결과값을적으시오. (5) x = (3 + 7) * 6; x = 60 x = (12 + 6) / 2 * 3; x = 27 x = 3 * (8 / 4 Introduction to software design 2012-1 Final 2012.06.13 16:00-18:00 Student ID: Name: - 1 - 0. 표지에이름과학번을적으시오. (6) 1. 변수 x, y 가 integer type 이라가정하고다음빈칸에 x 와 y 의계산결과값을적으시오. (5) x = (3 + 7) * 6; x = 60 x

More information

스레드를적용하지않은결과와스레드를적용한결과의비교 1) 두개의작업을스레드를사용하지않고수행한예 ) : 순차작업 class ThreadTest2 { System.out.print("-");// 화면에 - 를출력하는작업 System.out.print(" ");// 화면에 를출력

스레드를적용하지않은결과와스레드를적용한결과의비교 1) 두개의작업을스레드를사용하지않고수행한예 ) : 순차작업 class ThreadTest2 { System.out.print(-);// 화면에 - 를출력하는작업 System.out.print( );// 화면에 를출력 실 (thread) 을이용한병렬처리 스레드 (thread) 는실을의미한다. 즉, 실하나에여러작업들이꿰어져서순서적으로처리된다. 그런데, 실을여러개 만들고이실에여러작업들을꿰어서이실들을순서적으로처리하게하면, 여러개의작업들이한꺼번에처리된다. 즉, 일정한단위시간당처리되는작업의수를증가시킬수있다. 스레드생성방법에대한예제 ) class ThreadTest1 { ThreadClass1

More information

Microsoft Word - java19-1-midterm-answer.doc

Microsoft Word - java19-1-midterm-answer.doc 중간고사 담당교수 : 단국대학교응용컴퓨터공학박경신 답은반드시답안지에기술할것. 공간이부족할경우반드시답안지몇쪽의뒤에있다고명기한후기술할것. 그외의경우의답안지뒤쪽이나연습지에기술한내용은답안으로인정안함. 답에는반드시네모를쳐서확실히표시할것. 답안지에학과, 학번, 이름외에본인의암호 (4자리숫자 ) 를기입하면성적공고시학번대신암호를 사용할것임. 1. 다음질문에답을하라. (55

More information

C++-¿Ïº®Çؼ³10Àå

C++-¿Ïº®Çؼ³10Àå C C++. (preprocessor directives), C C++ C/C++... C++, C. C++ C. C C++. C,, C++, C++., C++.,.. #define #elif #else #error #if #itdef #ifndef #include #line #pragma #undef #.,.,. #include #include

More information

untitled

untitled Step Motor Device Driver Embedded System Lab. II Step Motor Step Motor Step Motor source Embedded System Lab. II 2 open loop, : : Pulse, 1 Pulse,, -, 1 +5%, step Step Motor (2),, Embedded System Lab. II

More information

¾Ë·¹¸£±âÁöħ¼�1-ÃÖÁ¾

¾Ë·¹¸£±âÁöħ¼�1-ÃÖÁ¾ Chapter 1 Chapter 1 Chapter 1 Chapter 2 Chapter 2 Chapter 2 Chapter 2 Chapter 2 Chapter 3 Chapter 3 Chapter 3 Chapter 3 Chapter 3 Chapter 3 Chapter 3 Chapter 3 Chapter 4 Chapter 4

More information

01....b74........62

01....b74........62 4 5 CHAPTER 1 CHAPTER 2 CHAPTER 3 6 CHAPTER 4 CHAPTER 5 CHAPTER 6 7 1 CHAPTER 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

More information

(291)본문7

(291)본문7 2 Chapter 46 47 Chapter 2. 48 49 Chapter 2. 50 51 Chapter 2. 52 53 54 55 Chapter 2. 56 57 Chapter 2. 58 59 Chapter 2. 60 61 62 63 Chapter 2. 64 65 Chapter 2. 66 67 Chapter 2. 68 69 Chapter 2. 70 71 Chapter

More information

歯JavaExceptionHandling.PDF

歯JavaExceptionHandling.PDF (2001 3 ) from Yongwoo s Park Java Exception Handling Programming from Yongwoo s Park 1 Java Exception Handling Programming from Yongwoo s Park 2 1 4 11 4 4 try/catch 5 try/catch/finally 9 11 12 13 13

More information

Spring Boot/JDBC JdbcTemplate/CRUD 예제

Spring Boot/JDBC JdbcTemplate/CRUD 예제 Spring Boot/JDBC JdbcTemplate/CRUD 예제 오라클자바커뮤니티 (ojc.asia, ojcedu.com) Spring Boot, Gradle 과오픈소스인 MariaDB 를이용해서 EMP 테이블을만들고 JdbcTemplate, SimpleJdbcTemplate 을이용하여 CRUD 기능을구현해보자. 마리아 DB 설치는다음 URL 에서확인하자.

More information

歯9장.PDF

歯9장.PDF 9 Hello!! C printf() scanf() getchar() putchar() gets() puts() fopen() fclose() fprintf() fscant() fgetc() fputs() fgets() gputs() fread() fwrite() fseek() ftell() I/O 2 (stream) C (text stream) : `/n'

More information

106 107, ( ),, ( ), 3, int kor[5]; int eng[5]; int Microsoft Windows 4 (ANSI C2 ) int kor[5] 20 # define #define SIZE 20 int a[10]; char c[10]; float

106 107, ( ),, ( ), 3, int kor[5]; int eng[5]; int Microsoft Windows 4 (ANSI C2 ) int kor[5] 20 # define #define SIZE 20 int a[10]; char c[10]; float Part 2 31 32 33 106 107, ( ),, ( ), 3, int kor[5]; int eng[5]; int Microsoft Windows 4 (ANSI C2 ) int kor[5] 20 # define #define SIZE 20 int a[10]; char c[10]; float f[size]; /* 10 /* c 10 /* f 20 3 1

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 @ Lesson 4 (Object) (Class) (Instance) (Method) (Constructor) Memory 1 UML 1 @ & 1 (Real World) (Software World) @ &.. () () @ & 2 (Real World) (Software World) OOA/ Modeling Abstraction Instantiation

More information

01-OOPConcepts(2).PDF

01-OOPConcepts(2).PDF Object-Oriented Programming Concepts Tel: 02-824-5768 E-mail: hhcho@selabsoongsilackr? OOP (Object) (Encapsulation) (Message) (Class) (Inheritance) (Polymorphism) (Abstract Class) (Interface) 2 1 + = (Dependency)

More information

Microsoft PowerPoint - lec3.ppt

Microsoft PowerPoint - lec3.ppt 2008 학년도 1 학기 상지대학교컴퓨터정보공학부 고광만 강의내용 연산자 (operator) 연산자종류연산자우선순위자료형변환 문장 (statement) 배정문 혼합문 제어문조건문, 반복문, 분기문 표준입출력 2 연산자 식 (expression) 의의미를결정 식은연산자 (operator) 와피연자 (operand) 로구성식의값에따라산술식, 관계식, 논리식으로구분

More information

Semantic Consistency in Information Exchange

Semantic Consistency in Information Exchange 제 6 장제어 (Control) 6.1 구조적프로그래밍 (Structured Programming) 6.2 예외 (Exceptions) Reading Chap. 7 숙대창병모 1 6.1 구조적프로그래밍 숙대창병모 2 Fortran 제어구조 10 IF (X.GT. 0.000001) GO TO 20 11 X = -X IF (X.LT. 0.000001) GO TO

More information

MasoJava4_Dongbin.PDF

MasoJava4_Dongbin.PDF JSTORM http://wwwjstormpekr Issued by: < > Revision: Document Information Document title: Document file name: MasoJava4_Dongbindoc Revision number: Issued by: < > SI, dbin@handysoftcokr

More information

교육자료

교육자료 THE SYS4U DODUMENT Java Reflection & Introspection 2012.08.21 김진아사원 2012 SYS4U I&C All rights reserved. 목차 I. 개념 1. Reflection 이란? 2. Introspection 이란? 3. Reflection 과 Introspection 의차이점 II. 실제사용예 1. Instance의생성

More information

(Microsoft PowerPoint - java2-lecture2.ppt [\310\243\310\257 \270\360\265\345])

(Microsoft PowerPoint - java2-lecture2.ppt [\310\243\310\257 \270\360\265\345]) Array 기초문법배열, 문자열, 입출력 514770-1 2017 년봄학기 3/22/2017 박경신 배열 (array) 여러개의데이터를같은이름으로활용할수있도록해주는자료구조 인덱스 (Index, 순서번호 ) 와인덱스에대응하는데이터들로이루어진자료구조 배열을이용하면한번에많은메모리공간선언가능 배열은같은타입의데이터들이순차적으로저장되는공간 원소데이터들이순차적으로저장됨

More information

스레드의우선순위 우선순위설정메소드 : void setpriority(int newpriority) newpriority 에설정할수있는등급 : 1( 가장낮은우선순위 ) 부터 10( 가장높은우선순위 ) 가장높은우선순위 : MAX_PRIORITY, 보통우선순위 : NORM_

스레드의우선순위 우선순위설정메소드 : void setpriority(int newpriority) newpriority 에설정할수있는등급 : 1( 가장낮은우선순위 ) 부터 10( 가장높은우선순위 ) 가장높은우선순위 : MAX_PRIORITY, 보통우선순위 : NORM_ 10 초동안사용자가입력하지않으면종료하는예제 ) import javax.swing.joptionpane; class AutoTermination { static boolean inputcheck = false; public static void main(string[] args) throws Exception { FirstThread th1 = new FirstThread();

More information

PowerPoint Presentation

PowerPoint Presentation 자바프로그래밍 1 클래스와메소드심층연구 ( 실습 ) 손시운 ssw5176@kangwon.ac.kr 예제 1. 접근제어 class A { private int a; int b; public int c; // 전용 // 디폴트 // 공용 public class Test { public static void main(string args[]) { A obj = new

More information

Network Programming

Network Programming Part 4 자바네트워크프로그래밍 1. Java IO 2. 스레드 (Thread) 클래스의소개 3. Java Socket 1. 자바입출력 Java_source->src->ch11 1.0 I/O Stream

More information

프로그램을 학교 등지에서 조금이라도 배운 사람들을 위한 프로그래밍 노트 입니다. 저 역시 그 사람들 중 하나 입니다. 중고등학교 시절 학교 도서관, 새로 생긴 시립 도서관 등을 다니며 책을 보 고 정리하며 어느정도 독학으르 공부하긴 했지만, 자주 안하다 보면 금방 잊어

프로그램을 학교 등지에서 조금이라도 배운 사람들을 위한 프로그래밍 노트 입니다. 저 역시 그 사람들 중 하나 입니다. 중고등학교 시절 학교 도서관, 새로 생긴 시립 도서관 등을 다니며 책을 보 고 정리하며 어느정도 독학으르 공부하긴 했지만, 자주 안하다 보면 금방 잊어 개나리 연구소 C 언어 노트 (tyback.egloos.com) 프로그램을 학교 등지에서 조금이라도 배운 사람들을 위한 프로그래밍 노트 입니다. 저 역시 그 사람들 중 하나 입니다. 중고등학교 시절 학교 도서관, 새로 생긴 시립 도서관 등을 다니며 책을 보 고 정리하며 어느정도 독학으르 공부하긴 했지만, 자주 안하다 보면 금방 잊어먹고 하더라구요. 그래서,

More information

12-file.key

12-file.key 11 2 ,, (Generic) (Collection) : : : :? (String).. java.lang.stringbuffer. s String s = "abcd"; s = s + "e"; a b c d e a b c d e ,., "910359,, " "910359" " " " " (token) (token),, (delimiter). java.util.stringtokenizer

More information

제11장 프로세스와 쓰레드

제11장 프로세스와 쓰레드 제9장자바쓰레드 9.1 Thread 기초 (1/5) 프로그램 명령어들의연속 (a sequence of instruction) 프로세스 / Thread 실행중인프로그램 (program in execution) 프로세스생성과실행을위한함수들 자바 Thread 2 9.1 Thread 기초 (2/5) 프로세스단위작업의문제점 프로세스생성시오버헤드 컨텍스트스위치오버헤드

More information

<4D F736F F F696E74202D20C1A63036C0E520BCB1C5C3B0FA20B9DDBAB928B0ADC0C729205BC8A3C8AF20B8F0B5E55D>

<4D F736F F F696E74202D20C1A63036C0E520BCB1C5C3B0FA20B9DDBAB928B0ADC0C729205BC8A3C8AF20B8F0B5E55D> Power Java 제 6 장선택과반복 이번장에서학습할내용 조건문이란? if 문 if, else 문 중첩 if 문 switch 문 break문 continue문 지금까지는문장들이순차적으로실행된다고하였다. 하지만필요에따라서조건이만족되면문장의실행순서를변경할수있는기능이제공된다. 3 가지의제어구조 조건문 문장이실행되는순서에영향을주는문장 조건에따라서여러개의실행경로가운데하나를선택

More information

14-Servlet

14-Servlet JAVA Programming Language Servlet (GenericServlet) HTTP (HttpServlet) 2 (1)? CGI 3 (2) http://jakarta.apache.org JSDK(Java Servlet Development Kit) 4 (3) CGI CGI(Common Gateway Interface) /,,, Client Server

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 @ Lesson 1,..... @ 1 Green Project 1991 Oak Java 1995. 5 December '90 by Patrick Naughton, Mike Sheridan and James Gosling Embedded in various consumer electronic device 1992. 9. 3 Star 7 1993 www portability

More information

61 62 63 64 234 235 p r i n t f ( % 5 d :, i+1); g e t s ( s t u d e n t _ n a m e [ i ] ) ; if (student_name[i][0] == \ 0 ) i = MAX; p r i n t f (\ n :\ n ); 6 1 for (i = 0; student_name[i][0]!= \ 0&&

More information

PowerPoint Presentation

PowerPoint Presentation public class SumTest { public static void main(string a1[]) { int a, b, sum; a = Integer.parseInt(a1[0]); b = Integer.parseInt(a1[1]); sum = a + b ; // 두수를더하는부분입니다 System.out.println(" 두수의합은 " + sum +

More information

쉽게 풀어쓴 C 프로그래밊

쉽게 풀어쓴 C 프로그래밊 Power Java 제 27 장데이터베이스 프로그래밍 이번장에서학습할내용 자바와데이터베이스 데이터베이스의기초 SQL JDBC 를이용한프로그래밍 변경가능한결과집합 자바를통하여데이터베이스를사용하는방법을학습합니다. 자바와데이터베이스 JDBC(Java Database Connectivity) 는자바 API 의하나로서데이터베이스에연결하여서데이터베이스안의데이터에대하여검색하고데이터를변경할수있게한다.

More information

ilist.add(new Integer(1))과 같이 사용하지 않고 ilist.add(1)과 같이 사용한 것은 자바 5.0에 추가된 기본 자료형과 해당 객체 자료 형과의 오토박싱/언박싱 기능을 사용한 것으로 오토박싱이란 자바 컴파일러가 객체를 요구하는 곳에 기본 자료형

ilist.add(new Integer(1))과 같이 사용하지 않고 ilist.add(1)과 같이 사용한 것은 자바 5.0에 추가된 기본 자료형과 해당 객체 자료 형과의 오토박싱/언박싱 기능을 사용한 것으로 오토박싱이란 자바 컴파일러가 객체를 요구하는 곳에 기본 자료형 바에 제네릭스(generics)를 도입하기 위한 연구는 이미 8년 전인 1996년부터라고 한다. 실제로 자바에 제네릭스를 도입하 는 몇 가지 방안들이 논문으로 나오기 시작한 것이 1998년 초임을 감 안하면 무려 8년이 지난 후에야 자바 5.0에 전격 채택되었다는 것은 이것이 얼마나 어려운 일이었나 하는 것을 보여준다. 자바의 스펙을 결정하는 표준화 절차인

More information