This week's book giveaway is in the OCAJP forum. We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line! See this thread for details.
I am planning to write a method which a parameter of tableName(String type) will be passed in and will return a vector. That vector's element is a record which is a String array. To realize that function, I need: 1.to get the table's fileds count which is the length to initial array; 2. the first, second ... the n th filed name; 3. the type of the first, seconde...the n the filed. Could you help me please?
SCJP 1.4 SCJD
posted 10 years ago
You can use the following code to get number of fields, each field name and each field type in the table.