Here you can find the source of getTables(Connection connection)
private static ResultSet getTables(Connection connection) throws SQLException
//package com.java2s; import java.sql.*; public class Main { private static ResultSet getTables(Connection connection) throws SQLException { return connection.getMetaData().getTables(null, null, "%", new String[] { "TABLE" }); }// w w w . java2 s . co m }