import java.io.File; import java.io.FileReader; import java.util.Scanner; import sun.io.CharToByteASCII; public class gehards { public static void main(String[] args) throws java.io.IOException { Scanner sc = new Scanner(System.in); //ACHTUNG DATEINAME HAT SICH GEƄNDERT File datei = new File("\\c:\\file.bis"); FileReader lesen = new FileReader(datei); int rando = lesen.read(); //char value = while((char) rando != sc.nextInt()){ System.out.println("Bitte nochmal versuchen:" + (char) rando); } System.out.println("Hey super treffer"); lesen.close(); } }