• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

what does it mean when an arryList returns []

 
rammie singh
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everybody

i have an application in which i am making a query and storing the results in an arryList.

and finally that arrayList is returned from the function.

but for no data the arrayList being returnd is [].

means say my arraylist is fetchSolnArrayList ...then after returning if i try to display as



it returns [].

while in my application i need to have a condition where fetchSolnArrayList is null and on basis of that comparision i need to move ahead.

how can i make the arrayList to point to null if it returns [].

actually i tried something like this



but i think this is not correct.Please help me in finding the solution.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64620
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please take the time to choose the correct forum for your posts. This forum is for questions on Servlets.

For more information, please read this.

This post has been moved to a more appropriate forum.
 
Rob Spoor
Sheriff
Pie
Posts: 20494
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[] means the list is empty - it has no elements. Now go to the API for List and find the method you need.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic