Q:

Create a list from instance variables of items in array using streams

I have an array of items, and I want to create a list (or any iterable) from an instance variable belonging to them.
public void foo(final MyClass... args) {
    final List<Baz> properties = new ArrayList<>();
    for (final MyClass a : args) {
        properties.add(a.getProperty());
    }
}

How would I do this using a one-liner stream?

A:

List<Baz> list = Arrays.stream(args).map(MyClass::getProperty).collect(Collectors.toList());
Iterable<Baz> iterable = () -> Arrays.stream(args).map(MyClass::getProperty).iterator();

