title: retrieving data from mysql select statement in java
body: <p>Having trouble with this..I'm sure I'm missing something simple but I simply want the result of a select statement in a java mysql select statement but I keep getting:</p>
  
  <pre><code>com.mysql.jdbc.JDBC4ResultSet@1c190c99
  </code></pre>
  
  <p>Here's my code:</p>
  
  <pre><code>PreparedStatement Findstatement;
                  Findstatement = con.prepareStatement("SELECT Code from DataMaster where DataName= (?) ");
                  Findstatement.setString(1, Name);  // I have a variable in my file named 'Name' 
                  ResultSet CodeAll  = Findstatement.executeQuery();
                  System.out.println(CodeAll);
  </code></pre>
  
  <p>I've tried int fundCode = fundCodeAll.getInt(1); at the end of the statement but still no luck.  How do I get the int value of the the result from the select statement?</p>