Hallo,
Ich habe folgende Methode geschrieben:
Nun an dieser Stelle
wirft die Compiler
dieser Fehler:
Ich habe folgende Methode geschrieben:
Java:
public static Computer liesComputer(){
Computer pc = new Computer();
Scanner input = new Scanner(System.in);
System.out.println("Bezeichnung eingeben: ");
pc.bezeichnung = input.next();
System.out.println("Preis eingben: ");
pc.preis = input.nextInt();
System.out.println("Netzteil: ");
pc.ntzteil = input.nextInt();
System.out.println("BlueRay: ");
pc.blueRay = input.nextBoolean();
System.out.println("Festplattenkapazität: ");
pc.festplattenkapazitaet =input.nextInt();
System.out.println("Aufrüstbar: ");
pc.aufruestbarkeit= pc.ntzteil>700;
return pc;
}
Java:
Computer pc = new Computer();
dieser Fehler:
HTML:
No enclosing instance of type probe_klausur is accessible. Must qualify the allocation with an enclosing instance of type probe_klausur (e.g. x.new A() where x is an instance of probe_klausur).