摘要:
package work; import java.lang.reflect.Constructor; import java.lang.reflect.Field; import java.lang.reflect.Method; public class demo04 { /*6.定义一个标准的JavaBean,名叫Person,包含属性name、age。 使用反射的方式... 阅读全文
摘要:
package demo02; import java.lang.reflect.Method; import java.util.ArrayList; public class demo04 { //ArrayList list 添加int类型数据 public static void main(String[] args) throws Exception { ... 阅读全文
摘要:
1.写一个模拟的servlet接口,其中有三个方法init,service,destroy 写一个实现类重写这三个方法,然后写一个web.xml配置此实现类,写一个测试类,通过反射,给我调用实现类的三个方法 阅读全文
摘要:
// 1.获取解析器 SAXReader sax =new SAXReader(); //2.获得docunment文档对象 Document doc =sax.read("src/demo03/schema.xml"); //3.获得根元素 Element root =doc.getRootElement(); ... 阅读全文
摘要:
MyServlet1 demo1.person MyServlet1 /hello 阅读全文
摘要:
<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://www.example.org/web-app_2_5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:s 阅读全文