D
D
diezeitschriftenliteratur2020-10-17 22:46:42
Java
diezeitschriftenliteratur, 2020-10-17 22:46:42

How to write a long return with a condition in java?

How to briefly describe such an expression in python in Java?

return b[0] == b[4] == b[8] or \
    b[2] == b[4] == b[6] or \
    b[0] == b[1] == b[2] or \
    b[3] == b[4] == b[5] or \
    b[6] == b[7] == b[8] or \
    b[0] == b[3] == b[6] or \
    b[1] == b[4] == b[7] or \
    b[2] == b[5] == b[8]

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Zagaevsky, 2020-10-18
@diezeitschriftenliteratur

or replace with ||
x == y == z replace with x == y && x == z

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question