枚举类型
来源:互联网 发布:软件实施合同 编辑:程序博客网 时间:2024/06/16 08:08
1、
2、jsp页面是可以访问枚举类型,实例代码如下:
枚举Color.java
public enum Color {WHITE, RED, BLACK;}
index.jsp页面:
<%@ page language="java" import="java.util.*,com.lqh.model.*" pageEncoding="ISO-8859-1"%><%String path = request.getContextPath();String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html> <head> <base href="<%=basePath%>"> <title>My JSP 'index.jsp' starting page</title> </head> <body> <% Color c = Color.RED; System.out.println(c); %> </body></html>
0 0
- 枚举类型
- 枚举类型
- 枚举类型
- 枚举类型
- 枚举类型
- 枚举类型
- 枚举类型
- 枚举类型
- 枚举类型
- 枚举类型
- 枚举类型
- 枚举类型
- 枚举类型
- 枚举类型
- 枚举类型
- 枚举类型
- 枚举类型
- 枚举类型
- 伙伴分配器的一个极简实现
- 深入理解java虚拟机【并发编程三特性】
- 伙伴分配器的一个极简实现
- Java反编译之代码混淆
- VM ware 启动时坏掉了的解决方法:Runtime error opening,big_linux.vbox' for reading: -102 (File not found.).
- 枚举类型
- java.lang.OutOfMemoryError: unable to create new native thread
- Box2D v2.1.0用户手册翻译 - 第02章 Hello Box2D
- Windwows 2003防火墙无法启动
- 一种恢复ubuntu数据的方法
- Box2D v2.1.0用户手册翻译 - 第03章 公共模块(Common)
- ArcGIS for Flex API官网
- maven安装
- IE兼容性设置 applet 注册表