"I was using traditional if{}else{} blocks, and I was wanting to switch it to the ?: (if-else-then) comparative operator. My issue is that I am not sure how I should handle nested comparisons. So I have this: if(y<0) y=0; else if(y+h>s.getHeight()) y = s.getHeight()-h; Would I condense it like this: y = (y<0) ? 0 : ((y+h>s.getHeight()) ? s.getHeight()-h : y); or is there a different way?"