【JSP开源代码栏目提醒】:网学会员为广大网友收集整理了,3-9.jsp,希望对大家有所帮助!
<%@ page contentType="text/html;charset=gb2312"%><!--JSP指令标签-->
<%@ page import="java.util.*"%> <!--JSP指令标签-->
<html><!--HTML标记符-->
<body>
<%//以下为Java程序片
boolean booleanTemp=true;
Boolean BooleanTemp=new Boolean(false);
byte byteTemp=80;
Byte ByteTemp=new Byte(byteTemp);
char charTemp='c';
Character CharacterTemp=new Character(charTemp);
int intTemp=234;
Integer IntegerTemp=new Integer(intTemp);
short shortTemp=235;
Short ShortTemp=new Short(shortTemp);
long longTemp=1234567;
Long LongTemp=new Long(longTemp);
float floatTemp=1.234F;
Float FloatTemp=new Float(floatTemp);
double doubleTemp=1.23E-8;
Double DoubleTemp=new Double(doubleTemp);
out.println("布尔型包装对象BooleanTemp值为:"+BooleanTemp.booleanValue()+"<br>");
out.println("字符型包装对象CharacterTemp值为:"+CharacterTemp.charValue()+"<br>");
out.println("整型变包装对象IntegerTemp值为:"+IntegerTemp.intValue()+"<br>");
out.println("短整型包装对象ShortTemp值为:"+ShortTemp.shortValue()+"<br>");
out.println("字节型包装对象ByteTemp值为:"+ByteTemp.byteValue()+"<br>");
out.println("长整型包装对象LongTemp值为:"+LongTemp.longValue()+"<br>");
out.println("单精度型包装对象FloatTemp值为:"+FloatTemp.floatValue()+"<br>");
out.println("双精度型包装对象doubleTemp值为:"+doubleTemp+"<br>");
%>
</body><!--HTML标记符-->
</html>
上一篇:
3-8.jsp
下一篇:
法律专业开题报告范文