In Java you can't return multiple values per method. Methods much return exactly one value (or be declared void and return exactly 0 values, or throw an exception).

There are many solutions that...