xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
在java中,有时候你需要基于一个对象的类型来做一些判断。用关键字instanceof很容易办到。比如:
if ( object instanceof java.lang.string )
{ system.out.println("true");}
但是,如果在编译时你还不知道对象的类型,怎么办?标准api提供了java.beans.beans类,它可以让你在运行时动态测试对象的类型。
java.beans包还提供了很多类,可以帮助你实现自检﹑实例化﹑检查bean的运行环境等。你可以连接到 javabeans documentation,来查看更多类的使用。
Java Asp PHP .Net XML C/C++ CGI VB Jsp J2ee J2se J2me EJB Servlet Tomcat Resin Struts Weblogic Eclipse ANT GUI JMS Web servise IDEA Webphere Hibernate Spring Jboss Applet Swing Socket Javamail Perl Ajax P2P 安全 模式 框架 测试 开源 游戏
Windows XP Windows 2000 Windows 2003 Windows Me Windows 9.x Linux UNIX 注册表 操作系统 服务器 应用服务器