Skip to content
Snippets Groups Projects
Commit c7aaf79c authored by iliya.saroukha's avatar iliya.saroukha
Browse files

working

parent f61a57f4
No related branches found
No related tags found
No related merge requests found
*.class
public class Loop {
public static void whileWithDoWhile(int i) {
do {
System.out.println(i);
i++;
} while (i < 5);
}
public static void doWhileWithWhile(int i) {
while (i < 5) {
System.out.println(i);
i++;
}
}
public static void main(String args[]) {
whileWithDoWhile(0);
doWhileWithWhile(0);
}
}
```java
short s = 10; // ✓
byte b = s; // ✗
int i = s; // ✓
long l = s; // ✓
```
```java
short s = 10; // ✓
s = s + s; // ✗
s = s * 2; // ✗
```
```java
short s = 10;
int i = s++
```
À la fin de l'exécution la valeur de `i` sera 10 (donc `s` ne sera pas incrémentée)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment