This question i found at jdiscuss they says ans.1,3 is correct.
My question is that if i am not passing any value for price so it will be null so the null can not be convert in to int then it should give exception.
pls. clear my doubt.
Problem
Consider the following code of a JavaBean:
public class TicketBean
{
int price;
String name;
// assume usual getters and setters.
}
Now, consider this ticketview.jsp page code:
<html><head></head><body>
<jsp:useBean id="ticket" class="TicketBean"/>
<jsp:setProperty name="ticket" property="*"/>
Name : <%=ticket.getName()%>
Price : <%=ticket.getPrice()%>
</body>
<html>
Which of the following lines will be in the output of the JSP page, if it is accessed through URL:
http://servername/ticketview.jsp?name=AAA Options
Select 2 correct options.
1) Name : AAA
2)Price : 0
3)An exception stack trace.
4)Only this will be present:- Name : AAA
5)Translation error.