I thought it would have thrown a translation error but it worked fine and returned String value. Is String the default value when a type referred in <function-signature> cannot be found?
spec wrote:Type is a basic type or a fully qualified Java class name (including package name), as per the ’Type’ production in the Java Language Specification, Second Edition, Chapter 18.
Containers are known to be forgiving. They may allow things which are not 100% spec friendly. For the exam, trust your book better than your container.
Ankit Garg wrote:The return type (or parameter type) in the TLD should be fully qualified name of the class. So for SCWCD, you can say that the TLD is wrong as it uses String instead of java.lang.String. It might work on some containers, but the Specs say it should not work and the exam is based on the specs and not any containers...
Thank Ankit, now I got it. It's up to the Container developer. They can make these container to aware of these kind stuff or leave it (That means, the users of the container need to give full qualified names) Thanks!