Multiple Choice Question

Quiz Guidelines

 

QID: 
304
Question: 

Given the following pairs of method declarations, which of the statements are true?
1.    void perform_work(int time){ }
 int  perform_work(int time, int speed)         { return time*speed ;} 
2.    void perform_work(int time){ }
 int  perform_work(int speed)     {return speed ;} 
3.    void perform_work(int time){ }
 void Perform_work(int time){ }

Select 2 options

A. The first pair of methods will compile correctly and overload the method 'perform_work'. 
B. The second pair of methods will compile correctly and overload the method 'perform_work'. 
C. The third pair of methods will compile correctly and overload the method 'perform_work'. 
D. The second pair of methods will not compile correctly. 
E. The third pair of methods will not compile correctly. 

Q&A Set: