title: compare an String and an array element in java
body: <p>I am trying to compare an String and an array element. If the requested element</p>
  
  <pre><code>package com.company;
  
  public class Main {
  
      static String[] List = {
              "EUR", "AED"
      };
  
      static String[] IdList = {
              "EUREUR", "EURAED", "AEDEUR","AEDAED"
      };
      public static void main(String[] args)
      {
          String value1 = "EUR";
          String value2 = "EUR";
          for(int i = 0; i &lt; IdList.length; i++)
          {
              System.out.println(value1+value2 == IdList[i]);
          }
      }
  }
  </code></pre>
  
  <p>The problem is that it always returns false . Even if the requested String matches to a value in the array. Can you help me?</p>