powerboy powerboy - 7 months ago 25
Java Question

Parallel assignment in Java?

Does Java have something similar to Python's

[a, b, c] = (1, 2, 3)
or PHP's
list($a, $b, $c) = array(1, 2, 3)
?

Answer

Not really. You can do x = y = 0 to set several variables, but not a parallel assignment like Python.