Files

11 lines
646 B
Plaintext

Q8 simple factory: button("dark") -> [ dark button ]
Q8 factory method: new DarkDialog().show() -> dialog with [ dark button ]
Q9 LIGHT factory -> button=light checkbox=light
Q9 DARK factory -> button=dark checkbox=dark
Q10 builder defaults: method=GET timeout=30; headers map mutable? false
Q10 build() without url -> NullPointerException: url is required
Q10 JDK HttpRequest.newBuilder(uri).build() default method=GET
Q11 original tags after both copies were edited: [java, added-via-shallow]
Q11 shallow.tags() == original.tags()? true; deep.tags() == original.tags()? false
Q11 ArrayList.clone() shares elements: original.get(0) is now "a!"