Hallo, bei der ausführung des codes wird mir gesagt das diese methode string nicht anwenden kann.(solang ich das richtig verstanden hab)
Fehlermeldung: The method shiftAlphabet(String, int) in the type CeaserVerschluesselung is not applicable for the arguments (String)
Weiß wer woran das hagt?
Fehlermeldung: The method shiftAlphabet(String, int) in the type CeaserVerschluesselung is not applicable for the arguments (String)
Weiß wer woran das hagt?
Java:
public static String shiftAlphabet(String zvtext, int va)
{
String vtext = "";
for (int i = 0;i < zvtext.length();i++ ) {
char c = zvtext.charAt(i);
if (Character.isLetter(c)) {
if (Character.isUpperCase(c)) {
c = (char) (((c - 'A' + va) % 26) + 'A');
} else {
c = (char) (((c - 'a' + va) % 26) + 'a');
}
}
output += c;
}
return output;
}