title: Create datatable in java
body: <p>In c#, I used datatable to read &amp; compute values returning from SQL query like this</p>
  
  <pre><code>string connString = @"your connection string here";
  string query = "select * from table";
  
  SqlConnection conn = new SqlConnection(connString);        
  SqlCommand cmd = new SqlCommand(query, conn);
  conn.Open();
  
  // create data adapter
  SqlDataAdapter da = new SqlDataAdapter(cmd);
  // this will query your database and return the result to your datatable
  da.Fill(dataTable);
  </code></pre>
  
  <p>In java, I don't find such feature. Evaluating &amp; computing complex operations using join, filters is such a time &amp; memory consuming with database.</p>
  
  <p>So, I like to take the data in any object(like datatable in c#) then compute there only via lambda expressions which is much faster. I am thinking to use 2D arrays but they can store only particular type of values i.e. either Strings, int, etc. and also arrays doesn't provide such computing functions like Datatable does.</p>
  
  <p>I there any other way to achieve the same functionality?</p>