for4 학원 수업 11일차 220901 11-12 입출력스트림 FileOutputStream try - catch - finally FileOutputStream fos= new FileOutputStream(fileName, true); //true : 덮어쓰기X, 기존데이터 + 추가데이터 저장 12-1 ObjectOutputStream Classes that require special handling during the serialization and deserialization process must implement special methods with these exact signatures: 직렬화..? public class LottoDTO implements Serializable 2-3 for(: 배열){} 향상된 for문(.. 2022. 10. 6. 자바 반복문을 이용한 구구단 출력(while, do while, for) //2단 출력 System.out.printf("2 * %d = %d\n", 1, 2*1); System.out.printf("2 * %d = %d\n", 2, 2*2); System.out.printf("2 * %d = %d\n", 3, 2*3); 한줄한줄 칠 필요 없이 int i=1; System.out.println("2단"); while(i 2022. 10. 5. 자바 반복문 while, do while, for 기본 문법 Java - Loop Control 반복문의 3요소 (초기값, 조건문, 증감문) 초기값에 증감문을 더하여 조건문이 참인 횟수만큼 statements가 실행됩니다 반복문 세가지 while, do while, for를 차례로 살펴보자 while 문법Syntax while(Boolean_expression) { // Statements } A while loop statement in Java programming language repeatedly executes a target statement as long as a given condition is true. Boolean_expression이 '참'이면 Statements가 실행됩니다. 거짓일때까지 반복! 기본 예제 public class LoopTe.. 2022. 9. 30. 학원 수업 5일차 220824 9-10 com, user 가위바위보 게임 (IfTest02.java) 11-12 LoopTest Debug 활용 ㄴ breakpoint 걸고 하나씩 단계 확인해보기 12-1 구구단 프로그램(LoopTest03.java) while 3요소 = 초기값, 조건문, 증감문 중첩 while문? 알아두면 좋은 회사감 do while -syntax do { // Statements } while(Boolean_expression); do while이 while과 다른 점? 조건에 상관없이 무조건 한번은 실행 2-3 while/do while for -syntax for(initialization; Boolean_expression; update) { // Statements } DoWhileTest02.java =.. 2022. 9. 16. 이전 1 다음