title: Array Constants can only be used in initializers Error
body: <p>I am new to Java Programming.I want to fetch data from the database and show it in JTable.</p>
  
  <p>This is my current code.</p>
  
  <pre><code>String columns[]={"Transaction_id","User_name","Amount","Recharge_Spending","Spend_by"};
  Object data[][]=new Object[200][5]; 
  int i=0;
  while(rs.next())
  {
      result_Transaction_id[i]=rs.getInt("f.Transaction_id");
      result_User_name[i]=rs.getString("U.User_name");
      data[i][5]={(Object)result_Transaction_id[i],(Object)result_User_name[i]};//This is where i get error
      ++i;
  }
  JTable View_table =new JTable(data,columns);
  </code></pre>
  
  <p>I want to collect the results of the query and add them in the specified object.
  But i get the following error "Array constants can only be used in initializers".</p>
  
  <p>I found a lot of solutions to "Array Constants can only be used in initializers" error, but those don't suit my case.</p>