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
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