String PA; Scanner in = new Scanner(System.in, "Cp866"); PA = in.nextLine(); I can not find out the value of PA if, when typing, I press Enter without typing anything.
I tried if(PA == "") out.print("=="); if(PA == null) out.print("=="); Set null when declaring.
Solved the problem by checking the isEmpty () string.