Multiple Choice Question

Quiz Guidelines

 

QID: 
188
Question: 

Given:

interface Worker {   
void  performWork(); 
} class FastWorker  implements Worker {  
 public void  performWork(){ } 
} 

You are creating a class that follows "program to an interface" principle. Which of the following line of code will you most likely be using?

Select 1 option 

A. public FastWorker getWorker(){ return new Worker(); } 
B. public FastWorker getWorker(){ return new FastWorker(); } 
C. public Worker getWorker(){ return new FastWorker(); } 
D. public Worker getWorker(){ return new Worker(); } 

Q&A Set: 

Search the Web

Custom Search

Searches whole web. Use the search in the right sidebar to search only within javajee.com!!!