changed the structure
This commit is contained in:
parent
0b7a558f4e
commit
0596844f83
6 changed files with 15 additions and 7 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,3 +1,5 @@
|
||||||
|
package Archiv;
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
public class Yoda {
|
public class Yoda {
|
||||||
|
|
|
@ -28,5 +28,18 @@ public class Grundlagen {
|
||||||
System.out.println("Durchgang nr. " + anzahlDurchgaenge);
|
System.out.println("Durchgang nr. " + anzahlDurchgaenge);
|
||||||
anzahlDurchgaenge = anzahlDurchgaenge + 1;
|
anzahlDurchgaenge = anzahlDurchgaenge + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Datentypen
|
||||||
|
byte myByte = 127;
|
||||||
|
short myShort = 300;
|
||||||
|
|
||||||
|
// With float the f is necassary because java otherwise treats it as a double
|
||||||
|
// (simplified anwser)
|
||||||
|
double myDoubleValue = 34.568956;
|
||||||
|
float myFloatValue = 17.567f;
|
||||||
|
|
||||||
|
// Constant always uppercase // Fixed Number
|
||||||
|
|
||||||
|
final double PI = 3.141592876;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,12 +1,5 @@
|
||||||
public class Testcode {
|
public class Testcode {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|
||||||
int a = 1, b = 2, c = 3, d = 4, e = 5, f = 6, g = 7, h = 8;
|
|
||||||
int sum = a + b + c + d + e + f + g + h;
|
|
||||||
|
|
||||||
System.out.println(sum);
|
|
||||||
byte x = 127;
|
|
||||||
System.out.println(x);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue