About question enthuware.ocajp.i.v7.2.857
Posted: Wed Feb 12, 2014 4:24 pm
The question:
"Which of the following options would be a valid implementation of tester() method?"
I think the following two methods are perfectly valid:
2.public int tester(){ return 0; }
and
4.public String tester(){ return "false"; }
Now, to put them in the switch it is not so good. But otherwise they seem to be perfectly valid implementations of the "tester()" method.
Maybe the question should be changed to something in the likes of "What implementation of the tester method is valid for the code to compile".
/Chrilos
"Which of the following options would be a valid implementation of tester() method?"
I think the following two methods are perfectly valid:
2.public int tester(){ return 0; }
and
4.public String tester(){ return "false"; }
Now, to put them in the switch it is not so good. But otherwise they seem to be perfectly valid implementations of the "tester()" method.
Maybe the question should be changed to something in the likes of "What implementation of the tester method is valid for the code to compile".
/Chrilos