Beruflich Dokumente
Kultur Dokumente
int x, y;
x = 10;
y = -1 + 23 * 33 + 3 * 7 * (5 + 6);
System.out.print ("Das Resultat ist ");
System.out.println (x + y);
Programm
Klassendeklaration
Klassendeklaration Methodendeklaration
class Name { }
Schlüsselwort
Name: Zeichenreihe
Typ
Methodendeklaration ,
Typ
Name
Variablendeklaration
Block Anweisung
{ }
Schlüsselwort
Anweisung
Zuweisung ;
Methodenaufruf ;
Zuweisung
Name = Ausdruck
Bibliothek
Masch.sprache
Maschinensprache Prozessor Masch.sprache
Masch.sprache
Bibliothek
Klassenname.java
Klassenname.class
int x = 10;
int y = -1 + 23 * 33 + 3 * 7 * (5 + 6);
int y = -1 + 23 * 33 + 3 * 7 * (5 + 6);
int x = 10;
int y = -1 + 23 * 33 + 3 * 7 * (5 + 6);
System.out.print("Bitte Zahl eingeben: ");
int x = IO.eingabe();
System.out.print ("Das Resultat ist ");
System.out.println (x + y);
public class IO {
// Liest eine Zeile von StdEingabe und überprüft, ob es ein int ist.
try { ergebnis = Integer.parseInt(stdEingabe.readLine());}
return ergebnis;
}
}
II.1.1. Erste Schritte - 14 -
Programm und Import von Paketen
Programm
Klassendeklaration
Programm
int y = -1 + 23 * 33 + 3 * 7 * (5 + 6);
System.out.print("Bitte Zahl eingeben: ");
int x = IO.eingabe();
int y = -1 + 23 * 33 + 3 * 7 * (5 + 6);
System.out.print("Bitte Zahl eingeben: ");
int x = IO.Eingabe();
Anweisung
Zuweisung ;
Methodenaufruf ;
Zuweisung
Name = Ausdruck
Methodenaufruf ,
Name ( Ausdruck )
int betrag;
betrag = x >= 0 ? x : -x;
Grundwert
Name
Präfix-Operator
Methodenaufruf
( Ausdruck )
Infix-Operator