title: How to get index of value in array?
body: <p>I have an array like this :</p>
  
  <pre><code>String[] array = { "Designation1", "Designation2", "Designation3" };
  </code></pre>
  
  <p>If user put "Designation2" as input then the code should return <code>1</code>.</p>
  
  <p>It may be very simple question, but I am very new in Java. So please give some suggestions.</p>