first commit

This commit is contained in:
2022-12-07 10:06:14 +01:00
commit 7acee63be6
40 changed files with 433 additions and 0 deletions

40
EidP/Ueb03/zeichen.java Normal file
View File

@@ -0,0 +1,40 @@
class zeichen{
public static void main(String args[]){
System.out.println("Hello World");
System.out.print("Hello");//zusammen mit naechsten
System.out.println(" World");
System.out.println("4*5");//nicht berechnet
System.out.println(4*5);//berechnet
System.out.println("Dies ist" + "ein Text");
System.out.println("Dies ist"
+ "ein Text");//kein zeilenumbruch
System.out.println("Dies ist ein \nText" );//Zeilenumbruch
// Zeichen
System.out.println("\u0065");//e
System.out.println("");
System.out.println("\"");// "
// Ganze Zahlen
System.out.println(2147483647);
System.out.println(2147483647+1);//integer overflow
System.out.println(0xFF);//in zahlen umgewandelt
System.out.println(0xFFFF);
System.out.println(0xFFFFFF);
System.out.println(0xFFFFFFFF);
System.out.println("0xFG");
// Gleitpunktzahlen
System.out.println("Zahl " + 0.344e-17f );
System.out.println("Zahl " + 0.344e-17f );
System.out.println("Zahl " + 0.12345678901234567890);//gerundet
System.out.println("Zahl " + 0.12345678901234567890f);//frueher gerundet
System.out.println("Summe " + (5.6 + 5.8) );//wrong
System.out.println("Summe " + (12345678.0f + 0.1f) );//0.1 ignoriert
System.out.println("Differenz " + (0.123456789f - 0.123456788f) );//0
System.out.println("Summe " + ((12345678.0f + 0.1f) + 0.41f) );//anders als \/
System.out.println("Summe " + (12345678.0f + (0.1f + 0.41f)) );
}
}