From ce2a521e341455c499076e7c6e9d55bf15d4e838 Mon Sep 17 00:00:00 2001 From: "Meinen, Eva" Date: Wed, 25 Mar 2020 15:30:12 +0100 Subject: [PATCH 1/3] Add small changes --- typumwandlungen.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typumwandlungen.md b/typumwandlungen.md index 7514fad..dc7cbe9 100644 --- a/typumwandlungen.md +++ b/typumwandlungen.md @@ -16,7 +16,7 @@ long b = a; Umwandlung in einen kleineren Wertebereich ist nur **explizit** möglich. ```java int d = 3; -byte c = (byte) a; +byte c = (byte) (a); ``` ![bg right 75%](https://miro.medium.com/max/423/1*LQFhTJnVcsXhlQzrgjQIqQ.png) From 1eb492dff4c2c6a41998ac577ccd4a674a14f168 Mon Sep 17 00:00:00 2001 From: "Meinen, Eva" Date: Wed, 25 Mar 2020 15:31:10 +0100 Subject: [PATCH 2/3] Update typo --- typumwandlungen.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typumwandlungen.md b/typumwandlungen.md index dc7cbe9..5c6252a 100644 --- a/typumwandlungen.md +++ b/typumwandlungen.md @@ -16,7 +16,7 @@ long b = a; Umwandlung in einen kleineren Wertebereich ist nur **explizit** möglich. ```java int d = 3; -byte c = (byte) (a); +byte c = (byte) (d); ``` ![bg right 75%](https://miro.medium.com/max/423/1*LQFhTJnVcsXhlQzrgjQIqQ.png) From 8bb587cffdc2f211be666d3a5ec2a423f02d9e6d Mon Sep 17 00:00:00 2001 From: "Meinen, Eva" Date: Wed, 25 Mar 2020 15:37:24 +0100 Subject: [PATCH 3/3] Add exercises --- operatoren.md | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/operatoren.md b/operatoren.md index 3545cad..1b8b13d 100644 --- a/operatoren.md +++ b/operatoren.md @@ -79,17 +79,16 @@ boolean oneLarger = one > two; //oneLarger enthält true boolean result = true && false || !(false || true); //Welchen Wert hat result? ``` 2) ```java - boolean result = true && false || !(false || true); //Welchen Wert hat result? + int two = +3 -6; //Welchen Wert hat two? ``` 3) ```java - boolean result = true && false || !(false || true); //Welchen Wert hat result? + int x = 0; + x += 3; + x =+ 5; //Welchen Wert hat x? + ``` +4) ```java + int a = 3; + int b = ++a - 1; + int c = a++ * 6; //Welchen Wert haben a, b und c? ``` -int two = +3 -6; //Welchen Wert hat two? -int x = 0; -x += 3; -x =+ 5; //Welchen Wert hat x? -ant a = 3; -ant b = ++a - 1; -ant c = a++ * 6; //Welchen Wert haben a, b und c? -```