title: Java - How to get item index from an array with its value?
body: <p>If I have a array list say a string array, then how can I get index of an element with its value?</p>
  
  <p>Code exammple:</p>
  
  <pre><code>    private static final String[] TEST = new String[]{
        "abc","bcd","def"
  }
  </code></pre>
  
  <p>require its index with something like:</p>
  
  <pre><code>       int i = TEST.getPosition("abc");/TEST.indexof(...);//not available
  </code></pre>
  
  <p>Also I tried with creating ArrayAdapter.</p>
  
  <p>Is there anything like this? Or maybe I need to assign it with that adapter or something?</p>
  
  <p>Or,</p>
  
  <p>How can I get such index of an element?</p>