I have an array like this :
String[] array = { \"Designation1\", \"Designation2\", \"Designation3\" };
If user put \"Designation2\" as input th
You can do it like this.
String userinput="Designation2"; String[] array = { "Designation1", "Designation2", "Designation3" }; int length=array.length(); int index=0; for(int i=0;i
And index will give you the array key that user wants. Regards..