Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- Linux
- DoM
- control
- mysql
- architecture
- DATAPATH
- system
- php
- github
- MacOS
- Algorithm
- MIPS
- react
- DS
- javascript
- XML
- while
- Class
- html
- for
- computer
- function
- DB
- instruction
- python
- web
- Pipelining
- data structure
- Java
- CSS
Archives
- Today
- Total
목록casting (1)
YYYEJI
[JAVA] 형변환(Casting) 이란?
JAVA에서 변수의 타입을 변경할 때 사용하는 방법으로 두 가지가 있습니다. ① Implicit casting ② Explicit casting Data type의 계층입니다. Byte → short → int → long → float → double 1bytes → 2bytes → 4bytes → 8bytes → 4 bytes → 8btyes Implicit casting • 직접 선언해 주지 않아도 타입을 자동으로 바꿔주는 형변환 입니다. • 큰 타입에 넣는 경우에는 자동으로 타입을 바꿔줍니다. double x; int n = 5; x = n; Explicit casting • () variable_name • 변환할 타입을 직접 선언해줘야 되는 형변환 입니다. • 더 작은 타입에 집어 넣는 경우에..
Java
2022. 10. 22. 23:12