Update
This commit is contained in:
parent
76f23e7af0
commit
776d3ad17c
|
@ -10,15 +10,16 @@ Eva Meinen und Henri Burau
|
||||||
---
|
---
|
||||||
|
|
||||||
## Type Conversion
|
## Type Conversion
|
||||||
widening: **automatisch**
|
### Umwandlung in einen größeren Wertebereich
|
||||||
|
**automatisch**
|
||||||
|
|
||||||
byte → short → int → long → float → double
|
byte → short → int → long → float → double
|
||||||
|
|
||||||
char → int
|
char → int
|
||||||
|
|
||||||
---
|
|
||||||
narrowing: **explizit**
|
|
||||||
|
### Umwandlung in einen kleineren Wertebereich
|
||||||
|
nur **explizit** möglich
|
||||||
```java
|
```java
|
||||||
int a = 3;
|
int a = 3;
|
||||||
byte b = (byte) a;
|
byte b = (byte) a;
|
||||||
|
|
Loading…
Reference in New Issue