Meins
public text v1 · immutablepublic class Abc1 {
/**
* @param args
*/
public static String surprise(int a, int b, String d) {
return d+String.valueOf(a+ b);
}
public static void main(String[] args) {
// TODO Auto-generated method stub
int a = 4;
int b = 3;
String d = "Übung 2: ";
System.out.print( "Übung 1: Das Ergebnis wäre 3 und befindet sich" );
int c = a+b;
if(c != 3){
System.out.print( " NICHT" );
}
System.out.println( " in der IF-Abfrage." );
System.out.println( surprise(a, b, d) );
}
}