File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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: 29233
    
135

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: If statement to continue
 
Similar Threads
Quick Explaination of ! Please?
reverse an integer
Splitting a string
Generics questions
K&B generics doubt