1

Which GOF design pattern is applied in the code snippet below? public class PrintSpooler { private static final PrintSpooler INSTANCE = new PrintSpooler(); private PrintSpooler() {} public static PrintSpooler getInstance() { return INSTANCE; } }

Correct Answer: singleton design pattern

Make the most of this question

This page focuses on one Software Design Modeling (SDM) question from Engineering. After checking the answer, return to the topic list to practice more or run a timed set.

Software Design Modeling (SDM) MCQ: Which GOF design pattern is applied in the code snippet below? public class PrintSpooler { private static final PrintSpooler INSTANCE = new PrintSpooler(); private PrintSpooler() {} public static PrintSpooler getInstance() { return INSTANCE; } } | Extra Education