개발블로그

  • 홈
  • 태그
  • 방명록

ELSE 1

[JAVA] 조건문 (if , else if, else)

/* if문 예시 */ package chap02.ex04.ifstate;public class StmtIf { public static void main(String[] args) { System.out.println("철수가 두부를 사러간다."); int tubuBox =0; if(tubuBox>0) {//두부가 있을 경우에만 실행 System.out.println("두부를 산다."); } if(tubuBox0) { System.out.println("두부를 산다."); } else { System.out.println("순두부를 산다."); } System.out.println("집에 가자!"); } }

JAVA 2021.03.23
이전
1
다음
더보기
프로필사진

개발블로그

개발자 박응디 cjdrud123@naver.com

  • 분류 전체보기 (126)
    • JAVA (81)
    • Python & Django (6)
    • Server(설정 등) (5)
    • DB (2)
    • Git (4)
    • Swift (7)
    • React (6)
    • AWS (2)
    • CT (5)
    • 참고사항 (8)

Tag

entity, APP, JPA, test, code, mapping, 설정, IP, swift, React, Spring, python, 개발, query, IOS, java, TDD, testcode, 개발자, DB,

Calendar

«   2025/06   »
일 월 화 수 목 금 토
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

Copyright © Kakao Corp. All rights reserved.

티스토리툴바