Paul Sturrock wrote:Your declare i as a variable at the start of your program. Why?
You will only concatenate a String if you have two results returned. So you should print the contents of a.aa from the first row concatenated with cc
from the second row.
Paul Sturrock wrote:Do you not know how many columns you will be selecting in your SQL?
Still I am not understanding that why my this code is not working by getting two columns instead of first one
I am unable to pass the data as separate parameters to the method as the method is receiving this data as one parameter. what should I do in this case?
Farakh khan wrote:
Check the above code .
Ensure that dao.select() method returns only ArrayList (ie., resultList)
Farakh khan wrote:I also tried like the following but no success:
The message appears:
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0