Page 1 of 1

About Question com.enthuware.ets.scwcd.v5.2.347 :

Posted: Mon Nov 03, 2014 12:27 pm
by bluster
On this one the right answer is given as:
The Function class must have a method with signature: public static String transformString(String arg);
Would it not have to be:
public static java.lang.String transformString(java.lang.String arg);
Thanks for a clarification, if possible.

Re: About Question com.enthuware.ets.scwcd.v5.2.347 :

Posted: Wed Nov 05, 2014 9:00 am
by admin
Why do you think so? java.lang package is imported automatically by default in any java class.

Re: About Question com.enthuware.ets.scwcd.v5.2.347 :

Posted: Wed Nov 05, 2014 10:59 am
by bluster
I am still baffled, but leaning towards the need for class full names. I found 3 sources that seem to imply the full class is needed, though I will be the first to say that the 3 together put a good case forward but nothing definitive, steel-clad. I hope something can be found that lays this to rest in either direction. Until then, readers be the judge.

1) Not quite a clear endorsement, but JSP.2.6.4 on the specs has an example of a string in a signature with the full string class name.
<function-signature>java.lang.String nickName(java.lang.String) </function-signature>
2) I found a definite ringing endorsement though in a less-reliable-than-specs source - an interaction on code ranch. FWIW the OP confirms the full class name was needed. http://www.coderanch.com/t/451032/JSP/j ... L-Function

3) Some might say I am burying the lead here, but the third source where it is definitely said the full class name is needed is K&B, page 395:
Just remember in the TLD to specify the fully-qualified class name (unless it is a primitive) for each argument.

Re: About Question com.enthuware.ets.scwcd.v5.2.347 :

Posted: Wed Nov 05, 2014 7:38 pm
by admin
But the statement is talking about function class i.e. java code. Not the tld declaration.

Re: About Question com.enthuware.ets.scwcd.v5.2.347 :

Posted: Thu Nov 06, 2014 6:10 pm
by bluster
Got it. You are right, apologies.

Re: About Question com.enthuware.ets.scwcd.v5.2.347 :

Posted: Fri Nov 07, 2014 1:54 pm
by bluster
Moderator- please move if there is a proper place.

**
Pardon if off-topic, but I found no place for this info on the site. I just passed the test with an 89%. Knew nothing when started. Two months of study, KB and these tests. If you do well here and on the mock tests on KB, you will be OK.