Hi guys, I'm searching for someome to look at the code of "my first application" in order to get reviews like here is good or here is bad.

The main purpose of the program is to crawl e-mails from web pages. I've decided to write it when I started to learn java.
Please take a look at the code that I can know what mistakes I've done (think there are a lot...), what I have done good, and what should I consider when writing future java applications.

Java Code:
package mycrawler;

/**
 *
 * @author Victor
 */
public class mycrawler {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        
        crawler myC = new crawler();
        myC.start();
        

    }

}
Java Code:
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package mycrawler;

import java.io.*;
import java.net.*;
import java.util.regex.*;

public class crawler {
    String myStr,mail = "ceva",theURL = "",link = "",ignore;
    Pattern href;
    int startPos = 0;
    char[] myArr;
    db mydb = new db();

    crawler(){
        System.out.println("Starting up...");
        href = Pattern.compile( "href             # match href \n" +
                            "\\s*=\\s*\"      # 0 or more spaces, =, 0 ore more spaces, quote \n" +
                            "(http[^\"\\s]*)  # capture the URL itself, http followed by no spaces and no quotes \n" +
                            "\"               # ending with a quote \n",
                            Pattern.CASE_INSENSITIVE | Pattern.COMMENTS);

        // We will ignore URLs ending with certain extensions
        ignore = ".*(mov|jpg|gif|pdf)$";
    }
    public void start(){
        crawl();
    }
    private void crawl(){
        int k=0;
        do{
            k++;
            theURL = mydb.getNextLink();
            try{
                grabContent();
                getLinks();
                do{
                    mail = getNextMail();
                    mydb.pushMail(mail);
                }while(mail.length()>0);
            }catch(Exception e){
                System.out.println("Unexcepted error: " + e);
            }
        }while(theURL.length()>0 || k<10);
    }
    private void grabContent() throws IOException{
        BufferedReader br = null;
        myStr = "";
        try{
            URL resource = new URL(theURL);
            InputStream in = resource.openStream();
            br = new BufferedReader(new InputStreamReader(in));
            String ln;
            while((ln = br.readLine()) != null && myStr.length()<3000000){
                myStr+=ln;
               // constr
            }
        } catch(Exception e){
            System.err.println("Bad URL: " + e);
        }
        finally {
            br.close();
        }
        myArr = myStr.toCharArray();
    }
    private String getNextMail(){
        String str = "";
        for(int i=startPos;i<myStr.length();i++){
            if(myArr[i] == '@'){
              int s=i-1,f=i+1;
              char myChar = myArr[s];
              while((myChar >= 'A' && myChar <= 'Z') || (myChar >= 'a' && myChar <= 'z') || (myChar >= '0' && myChar <= '9') || myChar == '_' || myChar == '.'){
                  myChar = myArr[--s];
              }
              s++;
              myChar = myArr[f];
              while((myChar >= 'A' && myChar <= 'Z') || (myChar >= 'a' && myChar <= 'z') || (myChar >= '0' && myChar <= '9') || myChar == '_' || myChar == '.'){
                  myChar = myArr[++f];
              }
              int k=0;
              for(int j=s;j<f;j++,k++)
                  str+= myArr[j];
              myArr[i] = ' ';
              startPos = i;
              break;
           }
        }
        return str;
    }
    private void getLinks(){
      Matcher m = href.matcher(myStr);
      // While there are URLs
      while (m.find()) {
        // Grab the captured part of the regex (the URLPath itself)
        String newurl = m.group(1);
        // If it hasn't already been visited (or if it matches the ignore pattern)
        if (!newurl.matches(ignore))
            mydb.pushLink(newurl);
      }
    }


}
Java Code:
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package mycrawler;

import java.sql.*;

public class db {
        String dbUrl = "localhost";
        String db = "mydb";
        String user = "root";
	String password = "";
        Connection c;

    db(){
        System.out.println("Connecting to db...");
        connect();
    }
    private void connect(){
       try {
       // Load the JDBC driver
       Class.forName("org.gjt.mm.mysql.Driver");
        // Create a connection to the database
        String url = "jdbc:mysql://" + dbUrl + "/" + db; // a JDBC url
       c = DriverManager.getConnection(url, user, password);
       } catch (ClassNotFoundException e) {
        System.out.println("Driver error: "+e);
       } catch (SQLException e) {
        System.out.println("Could not connect to db: "+e);
        }
    }

    public void pushMail(String s) throws SQLException{
      Statement stm = c.createStatement();
      String query = "INSERT INTO `mydb`.`mail` (`mail`) VALUES ('" + s + "');";
      try{
          stm.executeUpdate(query);
      } catch (SQLException e){
          //push err
      }

    }
    public void pushLink(String s){
      try{
        Statement stm = c.createStatement();
        String query = "INSERT INTO `mydb`.`links` (`link`) VALUES ('" + s + "');";
        stm.executeUpdate(query);
      } catch (SQLException e){
          //push err
      }

    }
    public String getNextLink(){
        ResultSet rs = null;
        String str = "";
        int id = 0;
        try{
           Statement stm = c.createStatement();
           String query = "SELECT * FROM links ORDER BY id";
           rs = stm.executeQuery(query);
           rs.next();
           str = rs.getString("link");
           id = rs.getInt("id");
           query = "DELETE FROM links WHERE id=" + id;
           stm.executeUpdate(query);

        } catch (SQLException e){
          //push err
        }
        return str;
    }




}