Assume that you see the following lines of code:
Device dev = new Printer();
dev.getName();
Printer is a subclass of Device. Which of these classes must have a definition of method getName for this code to compile?
Device dev = new Printer();
dev.getName();
Printer is a subclass of Device. Which of these classes must have a definition of method getName for this code to compile?