• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

[Java] Multiple conditons for while loop?

InlineFive

Diamond Member
Hello everyone!

I'm just starting to learn Java but unfortunately I've already encountered a problem with While loops. In the past using multiple conditions in a Python While loop worked perfectly but that doesn't seem to be the case here.

Ideally the loop should work like this:

- execute until discarded equals 50
- OR -
- execute until both negPosition and posPosition equal 5

The code is attached; is this the proper way to incorporate such a thing? Currently I'm just testing with the latter conditions and the loops executes until just one Position variable reaches five.

Thanks!

I5
 
Back
Top