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)
pm.test(resultList.toArray());
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Farakh khan wrote:I also tried like the following but no success:
The message appears:
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
Best regards>
All of the following truths are shameless lies. But what about this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
|