This week's book giveaway is in the Spring forum.
We're giving away four copies of Spring in Action (5th edition) and have Craig Walls on-line!
See this thread for details.
Win a copy of Spring in Action (5th edition) this week in the Spring forum!
    Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

Swings  RSS feed

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Report post to moderator
I am showing my code here.
This is the code when i try to retrieve the data from the array(2d)


The problem I have is that if an element of the array is null it comes out.
But I need to add an elements into the array only by selecting the value.

Thanks
Chandramouli.V.N.
[ September 27, 2005: Message edited by: Michael Ernest ]
 
Ranch Hand
Posts: 410
  • Mark post as helpful
  • send pies
  • Report post to moderator
I don't know if I understand your question exactly, but I think you need to do something like this:

The problem is your use of the break keyword. You don't need to check if the item is null and then break if it is. You need to check if the item is not null, and if this is the case add the item to the list. If the item is null, nothing will be done just for that case, which is fine. We just ignore it and continue with the increment as before.
[ September 28, 2005: Message edited by: Stuart Gray ]
 
Chandra Moulee
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Report post to moderator
Stuart,
I cant understand this statement.(You need to check if the item is [b]not[b] null, and if this is the case add the item to the list).What is this
[b]not[b] null.

Regards

V.N.Chandramouli
 
Stuart Gray
Ranch Hand
Posts: 410
  • Mark post as helpful
  • send pies
  • Report post to moderator
Sorry, the [b] things were formatting marks that I messed up (fixed now).
 
author and iconoclast
Posts: 24203
40
Chrome Eclipse IDE Mac OS X
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!