I forgot to mention in my post that we are connecting to the database by remote and have limited access on system database tables that holds the data about the tables.
We are just given a set or a list of tables that we need to query to determine its Keys and display it. So I started looking up at the Java API for this but the class ResultSetMetaData was the one I found out. Unfortunately theres no method that would return if the column is a key or part of the keys.
Perhaps there's no workaround for this but to ask the DB Admin to give me access on these tables. Thanks again.