posted 20 years ago
Given:
1. public class MethodOver {
2. public void setVar (int a, int b, float c) {
3. }
4. }
Which two overload the setVar method? (Choose Two)
A. Private void setVar (int a, float c, int b) { }
B. Protected void setVar (int a, int b, float c) { }
C. Public int setVar (int a, float c, int b) (return a ; )
D. Public int setVar (int a, int b, float c) (return a ; )
E. Protected float setVar (int a, int b, float c) (return c ; )
Answer: A, C
I believe A,B,E are wrong because of Modifiers.
And I also believe C,D are wrong .I think "void" should instead of "int".
Thanks !!
[ September 22, 2004: Message edited by: Barry Gaunt ]