hi i'm new to java programming and i have a problem with using the scanner, here is an extract of the code , i need help with storing a value into a, it is initialized with null first but when i enter a string from the terminal and print out the output it is still null. what is wrong with the code? as you can see from the code i have not used the scanner but i have modified the code to 'a=Input.next();' but still no luck
public String processInput(String theInput) { String theOutput = null; String a=null; Scanner Input = new Scanner(System.in); if (state == WAIT) { theOutput="type enter" if (theInput.equalsIgnoreCase("enter")) { theOutput =question1[Question]; theInput=a; theOutput = "" a ""; } else { theOutput = "Wrong password " ; } }