Hallo, ich habe ein Passwortfeld und wollte das Passwort in einer Variable char P1 = 'a'; speichern. d.h. wenn P1 == a ist, soll der Wert überschrieben werden (gegen den Wert aus dem PasswortField. Ich bekomme aber Fehler.
char P1 = 'a';
if (P1 == 'a'){
P1 = passwordField1.getPassword();
}
FEHLER: Error: java: incompatible types: char[] cannot be converted to char
char P1 = 'a';
if (P1 == 'a'){
P1 = passwordField1.getPassword();
}
FEHLER: Error: java: incompatible types: char[] cannot be converted to char