public class Ausgaben {
public static void main(String[] args) {
int n = 1000000;
String vorname = "Holger";
System.out.println(n*n);
float f = 1.23456e10F;
System.out.println("(Float)Vorher f = " + f);
f = f - 1;
System.out.println("(Float)Nachher f = " + f);
double g = 1.23456e10;
System.out.println("(Double)Vorher g = " + g);
g = g - 1;
System.out.println("(Double)Nachher g = " + g);
int i = 1;
int j = 2;
System.out.println("Ganzzahldivision liefert: " + i/j);
double x = 1.0;
double y = 2.0;
System.out.println("Gleitkommadivision liefert: " + x/y);
double z = 4.35;
System.out.println("Gleitkommamultiplikation liefert: " + 100*z);
char c1 = 'a';
char c2 = '\u0061';
char c3 = 97 + 1;
System.out.println(c1);
System.out.println(c2);
System.out.println(c3);
System.out.println("Hallo");
System.out.print("Welt");
System.out.println(" - was machen die Geschäfte?");
System.out.print("Doppeltes Hochkomma: \" Backslash: \\ Tabulator \t");
System.out.print("Neue \n Zeile");
System.out.println("\nNochmal: " + "Hallo Welt");
System.out.println("7 + 5 = " + 7 + 5 );
System.out.println("7 + 5 = " + (7+5));
int vornamenlaenge = vorname.length();
System.out.println(vorname + "\n... hat die Laenge: " + vornamenlaenge);
String nameGross = vorname.toUpperCase();
System.out.println(nameGross);
double a1 = -5.0;
double a2;
a2 = Math.abs(a1);
System.out.println("a-Betrag=\t" + a2);
System.out.println("Zufallszahl=\t" + Math.random());
System.out.println("Wurzel(16)=\t" + Math.sqrt(16.0));
System.out.println("2 hoch 3=\t" + Math.pow(2,3));
System.out.println("Sin(3.141592)=\t" + Math.sin(3.141592));
System.out.println("Sin(90Grad)=\t" + Math.sin(Math.toRadians(90)));
System.out.println("e=\t" + Math.E);
System.out.println("pi=\t" + Math.PI);
}
}
