← Quiz: Observer, Strategy and Decorator: all 10 questions
Quiz: Observer, Strategy and Decorator · Question 8 of 10
Which JDK class is a well-known Decorator?
Which JDK class is a well-known Decorator?
- A.
java.lang.Math - B.
BufferedReader, which wraps anotherReader - C.
ArrayList - D.
String
Answer & explanation
Correct answer: BufferedReader, which wraps another Reader
new BufferedReader(new InputStreamReader(System.in)) adds buffering by wrapping.
Can you get the rest right without peeking?
Take the timed Quiz: Observer, Strategy and Decorator quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →