Add Type Conversion

This commit is contained in:
Meinen, Eva 2020-03-24 18:42:36 +01:00
parent 11948f5dfa
commit 76f23e7af0
1 changed files with 17 additions and 0 deletions

View File

@ -5,4 +5,21 @@ url: https://git.haw-hamburg.de/pm1-tutorium/slides
---
# Typumwandlungen
Eva Meinen und Henri Burau
---
## Type Conversion
widening: **automatisch**
byte → short → int → long → float → double
char → int
---
narrowing: **explizit**
```java
int a = 3;
byte b = (byte) a;
```