Merge branch 'master' of git.haw-hamburg.de:pm1-tutorium/slides
This commit is contained in:
commit
7a0bb0549a
|
@ -81,17 +81,16 @@ boolean oneLarger = one > two; //oneLarger enthält true
|
||||||
boolean result = true && false || !(false || true); //Welchen Wert hat result?
|
boolean result = true && false || !(false || true); //Welchen Wert hat result?
|
||||||
```
|
```
|
||||||
2) ```java
|
2) ```java
|
||||||
boolean result = true && false || !(false || true); //Welchen Wert hat result?
|
int two = +3 -6; //Welchen Wert hat two?
|
||||||
```
|
```
|
||||||
3) ```java
|
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?
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ long b = a;
|
||||||
Umwandlung in einen kleineren Wertebereich ist nur **explizit** möglich.
|
Umwandlung in einen kleineren Wertebereich ist nur **explizit** möglich.
|
||||||
```java
|
```java
|
||||||
int d = 3;
|
int d = 3;
|
||||||
byte c = (byte) a;
|
byte c = (byte) (d);
|
||||||
```
|
```
|
||||||
|
|
||||||

|

|
||||||
|
|
Loading…
Reference in New Issue