title: I have got ArrayIndexOutOfBounds exception..What is the reason?I diid'nt understand
body: <p>This is the java code </p>
  
  <pre><code>String arr[]=new String[3];
  String opdate=null; 
  list=new ArrayList&lt;String&gt;();
  ResultSet rs=ps.executeQuery(); 
  while(rs.next())
  {   
      opdate=rs.getString(1);
      arr=opdate.split("-");
      if(arr[1]==month)
      {
          list.add(rs.getString(1));
          list.add(rs.getString(2));
          list.add(rs.getString(3));
          list.add(rs.getString(4));
          list.add(rs.getString(5));
          list.add(rs.getString(6));
          list.add(rs.getString(7));
      }
  }
  </code></pre>
  
  <p>this returns nothing..where am i wrong?? plz help me out </p>