I have a question about "and" and "or' statements in java. Is there a way to use both of them in the same if statement?

for example:

```
if(a==max && b==0) || (a==max && c==0){
    a==0;
} else { 
     a==max;
}

```

is this legal?