Get the number of tables of a specific database

Hy, I have to get the number of tables of a specific database. To do this, I connect to the database(mysql) and I get a Connection object.

I do the next with this object:

DatabaseMetaData dbmd=connection.getMetaData();

ResultSet tables=dbmd.getTables(null, null, null, null);

--Now what to do to get the number of tables of the database?

Maybe counting the rows of this resultset I would get it

because each table of the database is represented in one row of

this ResulSet?

Thank you!!

[541 byte] By [J_MARTINEZa] at [2007-11-27 1:21:26]
# 1
Yes. Count them.
ChristopherAngela at 2007-7-11 23:59:12 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...