Answer:
Replace the comment with:
int p = 1; p < data.length - 1; p++
Explanation:
See attachment for proper format of the code
The loop header is expected to test if the current element is greater than the adjacent elements (i.e. array elements before and after it)
It should be noted that the first element of the array (index 0) has not element before it and the last element of the array has no element after it.
So, the loop header must start from index 1 and end at the last index - 1
The option that illustrates this is:
int p = 1; p < data.length - 1; p++
Answer:
Simplifies creating a complex program
Explanation:
#2: Portrait taller than wide & landscape wider than tall
Answer:
jspService()
Explanation:
These are the steps in JSP life cycle-
1. We have to convert JSP page to Servlet.
2.Then we compile the JSP page which convert it into test.java
3. In test.java ,we load the classes(test.class) in container.
4. Object(instance) is created in container .
5. Then, we initialize the init() method at the time of servlet generation.
6. After the initialization,for the requests we use _jspService() method to serve the incoming requests from JSP.
7. When the work of JSP is completed, we remove it from container by the help of jspDestroy() method.
There is no jspService() method in the JSP life cycle.