Above lines of code creates an object of ResultSetMetaData and
we can get the number of columns with the use of getColumnCount() methods.
Now we can get the column names with the index value by the method getColumnName().Here is the example code of GetColumnName.java
as follows: