About Question enthuware.ocajp.i.v8.2.1012 :
Posted: Mon Apr 24, 2017 5:28 am
This question doesn't quite make sense to me.
Consider the options written out.
1 must be valid.
2 is a method, not a constructor.
3 would be written like
Which is wrong. At first glance you might think it's for an interface, but interfaces don't have constructors.
4 must be correct.
5 would be written like
which is wrong since it has a ; at the end.
I can only see 2 valid constructors in this question.
Could someone enlighten me to the 3rd correct option?
Thanks!
Consider the options written out.
1 must be valid.
2 is a method, not a constructor.
3 would be written like
Code: Select all
public TestClass(String s);
4 must be correct.
5 would be written like
Code: Select all
public TestClass(String s1, String s2){
};
I can only see 2 valid constructors in this question.
Could someone enlighten me to the 3rd correct option?
Thanks!
