Der sagt in der ersten Zeile: class, enum or interface expected
Und wo muss ich den Quelltext einfügen?
EDIT: Behoben. Jetzt wird ausprobiert. Danke jetzt schonmal pixelflat!!!
EDIT 2: Check ich nicht. Ich arbeite mit BlueJ ( Schule ) und als Pin geb ich dann im Feld ein "0815"
Doch funktionieren tut nichts:
import javax.swing.JOptionPane;
public class Konto
{
private String name;
private String vorname;
private String knr;
private double kstand;
private double hzins;
private double szins;
private String blz;
private boolean Sperre;
private String pin;
public Konto()
{
name = "Schmidt";
vorname = "Hans";
knr = "123456789";
hzins = 1.0;
kstand = 96544863;
szins = 20.0;
blz = "300500";
pin = "0815";
}
public Konto (String name,String vorname,String knr,double kstand,double hzins,double szins,String blz,boolean Sperre,String pin)
{
this.name = name;
this. vorname = vorname;
this.knr = knr;
this.hzins = hzins;
this.szins = szins;
this.blz = blz;
this.pin = pin;
}
public Konto(String name,String vorname)
{
this.name = name;
this.vorname = vorname;
for (int i = 0; i < 32000;i++)
{
System.out.println("hallo");
}
}
public void ausZahlung (double betrag) {
for(int i=3; i>0; i--){
String pin = JOptionPane.showInputDialog("Bitte PIN eingeben:");
if(pin.equals(this.pin)){
kstand=kstand-betrag;
JOptionPane.showMessageDialog(null, "Auszahlung erfolgreich.");
break;
}
else {
if(i>1) JOptionPane.showMessageDialog(null, "Tut mir wirklich Leid! FALSCHER PIN! NOCHMAL!");
else { this.Sperre=true; JOptionPane.showMessageDialog(null, "Konto gesperrt!"); }
}
}
}
}
EDIT 3

: Geregelt! Vielen Dank!!!