title: cannot find symbol (java compile time error)
body: <p>I am running my servlet program on tomcat server. I want to perform some jdbc activities in it.
  I hv added that connector jar file in lib folder of tomcat(require for jdbc).I  hv posted the code here.. </p>
  
  <pre><code>     import java.io.*;
   import javax.servlet.*;
   import javax.servlet.http.*;
   import java.sql.*;
  
  
   public class showAccounts extends HttpServlet
   {
    public void doGet(HttpServletRequest request, HttpServletResponse response)
  
  
    throws IOException, ServletException
    {
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
  
  
   Connection con;
   Statement st;
   ResultSet rs;
  
   try
    {
    Class.forName("com.mysql.jdbc.Driver");
    con=DriverManager.getConnection("jdbc:mysql://teamindia:3306/forjava?user=root&amp;password=123");
  
     st=con.createStatement();
    rs=st.executeQuery("select * from users");
  
  
   while(rs.Next())
  {
    out.println("&lt;li&gt;"+rs.getString(1));
    }
  con.close();
    }
   catch(Exception e)
   {
   out.println(e); 
   }
    out.close();
  
   }
  
   }
  </code></pre>
  
  <p>while compiling...
  I am getting this error</p>
  
  <pre><code>  error: cannot find symbol
    while(rs.Next())
        ^
    symbol:   method Next()
    location: variable rs of type ResultSet
  </code></pre>
  
  <p>what's the problem? </p>