// "Add 'return' statement" "true-preview"
import java.util.*;
class T {
    String[] f() {
        List<String> list = new ArrayList<>();
        list.add("a");
        return <caret><selection>list.toArray(new String[0])</selection>;
    }
}