powerboy powerboy - 1 year ago 155
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 Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download