aspose file tools*
The moose likes Beginning Java and the fly likes what does it mean when an arryList returns [] Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "what does it mean when an arryList returns []" Watch "what does it mean when an arryList returns []" New topic
Author

what does it mean when an arryList returns []

rammie singh
Ranch Hand

Joined: Mar 26, 2009
Posts: 116
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

Joined: Jan 10, 2002
Posts: 61010
    
  65

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.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19670
    
  18

[] means the list is empty - it has no elements. Now go to the API for List and find the method you need.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: what does it mean when an arryList returns []