1. What happens, if you mistype and write
<c:out value="${x.mitle}" />
instead of
<c:out value="${x.title}" />
Compare that with the following:
<c:forEach var="x" items="${cat.books}">
instead of
The old notation gives out a compilation error. The use of JSTL does not give this error. See also the next exercise for this.
2. What are the effects of not treating null pointers as errors, but simply ignoring them? How does it affect the troubleshooting process? You might have sensed that very strong opinions have been expressed about this. Do not just accept it. Find out the arguments against it. It’s something the developers from Sun thought long and hard about before choosing this behavior. If you don’t have enough related experience, then talk to a veteran who’s had to maintain a program with more than ten thousand lines. Ask a Perl guru if they have ever used the strict option and why.
Lot of people would have learned programming on the C64 with Basic and considered JavaScript, Perl, and PHP to be their kind of programming languages. But once you learn Java, do some projects, and use server-side JavaScript in complex projects, you start admiring it despite its complexities. This is mainly because the compiler eliminates many sources of errors. With client-side JavaScript, it often happens that one of the branches of an If
statement is called only after weeks. To find and correct errors in that particular If
statement (which might be just spelling mistakes) at that point