Magna Concursos
2411611 Ano: 2011
Disciplina: TI - Desenvolvimento de Sistemas
Banca: UFC
Orgão: UNILAB
Provas:
Considere o código JSP ilustrado a seguir:
<%@ page language="java" import="java.util.*" %>
<HTML> <HEAD> <TITLE> Hello JSP</TITLE></HEAD>
<BODY>
<H1>
<%
Integer n = (Integer)application.getAttribute("numero");
if (n==null) {
n= new Integer(1);
application.setAttribute("numero",n);
}
else
{
n = new Integer(n.intValue() + 1);
application.setAttribute("numero",n);
}
%>
Numero = <%= n.toString() %> !!!
</H1>
</BODY>
</HTML>
O atributo “numero” estará disponível:
 

Provas

Questão presente nas seguintes provas

Analista de TI

50 Questões