Jeanne,
It's your quite excellent book, so I'll give you the benefit of the doubt on both being correct since it is backed.
I will not
point out, no I won't do that, that in your own reply to this post, your words "it creates a list ..." and also I'm going to pivot into my next
real question with this api
doc:
@SafeVarargs
public static <T> List<T> asList(T... a)
Returns a fixed-size list backed by the specified array. (Changes to the returned list "write through" to the array.) This method acts as bridge between array-based and collection-based APIs, in combination with Collection.toArray(). The returned list is serializable and implements RandomAccess.
This method also provides a convenient way to create a fixed-size list initialized to contain several elements:
List<String> stooges = Arrays.asList("Larry", "Moe", "Curly");
Type Parameters:
T - the class of the objects in the array
Parameters:
a - the array by which the list will be backed
Returns:
a list view of the specified array
I'm just trying to get clear in my mind on the "This topic isn't on the exam" section. Thus, my real questions:
There is only the above (un-overloaded, definitely not a real
word, "version of the") varrargs method? "A Cool Trick with Varrargs" exemplifies "when you pass in elements and take advantage of varargs", along with Mock questions 23 and 25 (prompting my original "isn't" errata question, but I guess 23 and 25 are used to make it "easier to read/write")? Mock question 24 uses the array and is more like the combination of asList(varrags) - array that will really appear on the exam? This is helpful to me because I'd like to get better timing and only focus on what needs to be focused on ... when I saw the options "the code doesn't compile" for 23 and 25 ... that didn't help my time much.
Thanks again Jeanne!