aspose file tools*
The moose likes Beginning Java and the fly likes If statement to continue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "If statement to continue" Watch "If statement to continue" New topic
Author

If statement to continue

Melisa Mitchell
Greenhorn

Joined: Sep 15, 2008
Posts: 12
Hello Everyone,

I have this code...


the stuff that is in bold is what i have added to it, what i have to do is say if thislevel is equal to null then continue, but its not working!?!?! what am i doing wrong anyone?

Thanks

[ September 25, 2008: Message edited by: Melisa Mitchell ]
[ September 25, 2008: Message edited by: Melisa Mitchell ]

.+*^*+.LDG.+*^*+.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30537
    
150

Melisa,
I think you mean the opposite - to only do the if statement if thisLevel is not null. (If it were null and the if statement executed, you'd get a null pointer calling getEnabled.)


When thisLevel is null, the if statement doesn't execute which means the next statement is the next iteration of the loop.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
Consider Paul's rocket mass heater.
 
subject: If statement to continue