Read a conditon from a file java : i wrote this java codes and i want the conditions to be read from a file.
is it possible? if you have any tutorial. or anything that will help me understand how to do it.

i have tried putting each condition in a file and read form that.

        if(con == 1){
            Scanner myScanner = new Scanner(new File("con.txt"));
        }
        else if(con == 2){
            Scanner myScanner = new Scanner(new File("con2.txt"));
        }
        else if(con == 3){
            Scanner myScanner = new Scanner(new File("con3.txt"));
        }
        else{
            System.out.println("You did not choose one of the 3 con");
        }
<code>

but it didnt work because in each if statement there is 2 conditions that need to be meet.

I hope it makes sense
