Program runs without exception but shows no table names
===

I have a few DB's in mysql and all of them contain some tables with a few columns. I got the code below from a stack overflow answer. 
The answer is at:
http://stackoverflow.com/questions/927807/how-can-i-detect-a-sql-tables-existence-in-java

The code gives the output-

    Driver Loaded.
    Got Connection.

Code-

    import java.sql.Connection;
    import java.sql.DatabaseMetaData;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.Statement;

    public class Main {
      public static void main(String[] args) throws Exception {
    DatabaseMetaData md = conn.getMetaData();
    ResultSet rs = md.getTables(null, null, "%", null);
    while (rs.next()) {
      System.out.println(rs.getString(3));
    }  }

      static Connection conn;

      static Statement st;

      static {
    try {
      // Step 1: Load the JDBC driver.
      System.out.println("Driver Loaded.");
      // Step 2: Establish the connection to the database.
      String url = "jdbc:mysql://localhost:3306/";

      conn = DriverManager.getConnection(url, "cowboy", "123456");
      System.out.println("Got Connection.");

      st = conn.createStatement();
    } catch (Exception e) {
      System.err.println("Got an exception! ");
      e.printStackTrace();
      System.exit(0);
    }
      }
    }