public class JBean
{
private
String title = "JBean";
private int num;
public void setTitle(String t){ this.title = t; }
public String getTitle(){ return this.title; }
public void setNum(int n){ this.num = n; }
public int getNum(){ return this.num; }
}
What will be printed when the following
JSP page is requested through the url:
http://localhost/test.jsp?num=4? <html><body>
<jsp:useBean id = "bean" class="JBean" />
<jsp:setProperty name="bean" property="*">
Title : <%=bean.getTitle()%> <br>
Num : <jsp:getProperty name="bean" property="num" />
</body></html>
Answer provided says :
Title : JBean (which is correct) and Num : 3 ???
I don't understand the second part