package Ueb03; 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)) ); } }