title: how to convert from Object[] to int[]
body: <p>I want to pass <code>myVector</code> to another class (<code>Case.java</code>) but I get this    kind of error message. Type mismatch: <strong>cannot convert from Object[] to int[]</strong>. Can anybody tell me how to solve this?</p>
  
  <p><strong>User.java</strong></p>
  
  <pre><code>JButton btnNewButton = new JButton("Process");
  
  btnNewButton.setBounds(360, 296, 89, 23);
  contentPane.add(btnNewButton);
  
  btnNewButton.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
          Integer a = (comboBox.getSelectedIndex() + 1);
          Integer b = (comboBox_1.getSelectedIndex() + 1);
          Integer day = (comboBox_2.getSelectedIndex() + 1);
          ArrayList&lt;Integer&gt; myVector = new ArrayList&lt;Integer&gt;();
          myVector.add(a);
          myVector.add(b);
          myVector.add(day);
  
          Case ca = new Case();
          try {
              ca.addPlace(myVector);
              LoginGUI um = new LoginGUI();
              um.setVisible(true);
  
          } catch (Exception e1) {
              // TODO Auto-generated catch block
              e1.printStackTrace();
          }
      }
  }
  </code></pre>
  
  <p><strong>Case.java</strong></p>
  
  <pre><code>public class Case {
  
      public Case() {
          // TODO Auto-generated constructor stub
      }
  
      public void addPlace(ArrayList&lt;Integer&gt; h) {
  
          int vec1[] = h.toArray();
          int vec2[] = {2, 1, 3, 2};
  
          double cos_sim = cosine_similarity(vec1, vec2);
      }
  </code></pre>