Notice
Recent Posts
Recent Comments
Link
250x250
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 | 31 |
Tags
- mysql
- javascript
- Class
- computer
- DATAPATH
- function
- DB
- system
- github
- instruction
- Java
- Rag
- DS
- Linux
- for
- python
- php
- html
- data structure
- control
- react
- web
- architecture
- XML
- openai
- AI
- MIPS
- Pipelining
- CSS
- Algorithm
Archives
- Today
- Total
목록Conditional (1)
YYYEJI
조건부 연산자(Conditional operator)란? If-else 문을 간결하게 해 놓은 코드입니다. Variable_name = (Boolean_Expression) ? Result1 : Result2 ; public static void main(String[] args) { int num = 2; System.out.print("The number is " + ((num%2==0) ? "positive" : "negative")); } 조건문에 맞춰서 결과가 true이면 Result1, 결과가 false이면 Result2가 실행됩니다. ◡̈
Java
2022. 12. 24. 17:46