Ich benutze Eclipse als IDE.Ne ordentliche IDE verwendet (IntelliJ)?
Version?Ne ordentliche IDE verwendet (IntelliJ)?
Coole Sache funktioniert einwandfrei bei NetBeans 8.2oump hat gesagt.:wenn man /** + Enter eingibt
Beweg deinen Cursor in die Methode und drücke anschließend die Kombination
Code:Shift + Alt + J
Funktioniert das? Was erscheint als Kommentar?
/**
*
*/
Version: Oxygen.1a Release (4.7.1a)Version?
@oump Was heisst: gleich am Anfang initialisiert?
Gerade mit Eclipse Oxygen probiert. Funktioniert einwandfrei.
@oump Was heisst: gleich am Anfang initialisiert?
Bei dieser Methode geht es.Poste mal deinen Code, ist die Klasse evtl. von einer Elternklasse abgeleitet worden, die auch die Methode enthält?
Wenn Ja, schreibe mal eine eigene Methode:
Java:public String someCode(String a) { return null; }
Und Probiere das mit dieser Methode.
Na es wird auf ne andere Klasse zugegriffen für Konsolenfehle.
public static void fahren() {
int randomG = 0;
int randomV = 0;
int randomM = 0;
int i;
int abstand;
double prozent = 0;
for (i = 5; i <= 55; i++) {
// Random Zahlen
randomG = randomG + (int) (Math.random() * 5) + 1;
randomV = randomV + (int) (Math.random() * 5) + 1;
randomM = randomM + (int) (Math.random() * 5) + 1;
Console.displayOff();
//Prozent + Linie zeichen
for (abstand = 5; abstand <= randomG; abstand++) {
Console.setBackground(Color.white);
Console.gotoXY(abstand, 6);
Console.write(" ");
Console.wait(1);
prozent = (abstand - 5) / 50 * 100;
Console.setBackground(Color.black);
Console.setForeground(Color.white);
Console.gotoXY(70, 6);
Console.write(prozent + "%");
}
for (abstand = 5; abstand <= randomV; abstand++) {
Console.setBackground(Color.white);
Console.gotoXY(abstand, 11);
Console.write(" ");
Console.wait(1);
prozent = (abstand - 5) / 50 * 100;
Console.setBackground(Color.black);
Console.setForeground(Color.white);
Console.gotoXY(70, 11);
Console.write(prozent + "%");
}
for (abstand = 5; abstand <= randomM; abstand++) {
Console.setBackground(Color.white);
Console.gotoXY(abstand, 16);
Console.write(" ");
Console.wait(1);
prozent = (abstand - 5) / 50 * 100;
Console.setBackground(Color.black);
Console.setForeground(Color.white);
Console.gotoXY(70, 16);
Console.write(prozent + "%");
}
Console.displayOn();
if (randomG >= 55) {
Console.setBackground(Color.black);
Console.setForeground(Color.white);
Console.gotoXY(5, 20);
Console.write("Son Goku hat gewonnen!");
return;
}
if (randomV >= 55) {
Console.setBackground(Color.black);
Console.setForeground(Color.white);
Console.gotoXY(5, 20);
Console.write("Vegeta hat gewonnen!");
return;
}
if (randomM >= 55) {
Console.setBackground(Color.black);
Console.setForeground(Color.white);
Console.gotoXY(5, 20);
Console.write("Majin Boo hat gewonnen!");
return;
}
}
}
public static void fahren() //....
public String someCode(String a) {
return null;
}
JavaDoc generiert eine Beschreibung inkl. Parameter(@param), Rückgabeparameter(@return), Exceptions(@throws). Es ist reichlich egal, wie die Methode implementiert ist. Dokumentiert sollte nur das was werden.Hab ich wohl was nicht verstanden richtig..