Text position
Hello, I have a Code in that I set a variable to a letter from the Alphabet. String chars = "abcdefghijklmnopqrstuvwxyzĂ€Ă¶ĂŒĂ.,:;?-_()'=+/@"; Random rnd = new Random(); char buchstabe = chars.charAt(rnd.nextInt(chars.length())); Then i have an Input from the user. String antwort = scan.nextLine(); scan.close(); At least I want to set the random letter to a specific result if (buchstabe = "a") { result = ._.; } else { System.out.println("False"); } What do i Need to Change to make it possible? I Always get at the if Clip: Exception in thread "main" java.lang.Error: Unresolved compilation problems: The operator && is undefined for the argument type(s) char, String Type mismatch: cannot convert from String to char Type mismatch: cannot convert from String[] to String It isnt the full Code.