My program is as follows, / ** Database Access package class.
* To change the template for this generated file go to * Window> Preferences> Java> Code Generation> Code and Comments * / package com.youcompany.struts.action; import java.sql *;. Public class QueryFromDB {/ *** table and column names with the table name select statement configured * @param colName * @param tableName * @ return * @throws ArrayIndexOutOfBoundsException * / public String ConstructQuery (String tableName, String [] colName) throws ArrayIndexOutOfBoundsException {String str = "select"; for (INT i = 0; i