I have an array like this :
String[] array = { \"Designation1\", \"Designation2\", \"Designation3\" };
If user put \"Designation2\" as input th
You could just use a for loop
String[] array = { "Designation1", "Designation2", "Designation3" }; Scanner kb=new Scanner(System.in); String input=kb.next(); int index; for(int i=0;i