Java Reference
In-Depth Information
System.out.println("a:"+a+"b:"+b);
System.out.println("a**:"+a**);
2
Aufgabe 4
Welche Ausgaben werden von folgendem Quellcode erzeugt?
System.out.println("c>b="+c>b);
System.out.println("c>b="+(c>b));
System.out.println("b<a="+(b<a));
System.out.println("c==b="+(c==b));
System.out.println("c>a<b="+(c>a<b));
System.out.println("a=b="+(a=b));
System.out.println("a="+a+"b="+b);
System.out.println("x>y="+(x>y));
y=y+0.1;
y=y+0.1;
System.out.println("y==2.5="+(y==2.5));
System.out.println("y = " + y);
doublez=1.0;
z=z+0.1;
z=z+0.1;
System.out.println("z==1.2="+(z==1.2));
System.out.println("z = " + z);
Aufgabe 5
Welche Ausgaben werden durch folgende Ausgabebefehle erzeugt?
boolean b_wert;
b_wert=a==c;
System.out.println("a==b="+(a==c));
System.out.println(b_wert);
System.out.println(!b_wert);
b_wert=a==b&&c>b;
System.out.println("a==b&&c>b="+b_wert);
b_wert=b<c&a++==4;
System.out.println("b<c&a++==4="+b_wert);
b_wert=b<c&++a==5;
System.out.println("b<c&++a==5="+b_wert);
a=3;
b_wert=b<c&++a==4;
Search WWH ::




Custom Search