摘要: public class test1 { public void test(String str){ System.out.print(str); } public static void main(String[] args) { test1 t = new test1(); t = null; t.test("abc"); }}会能通过编译,不能运行的会报错的哦!Exception in thread "main" java.lang.NullPointerExceptionat com.test.test1.main(test1.java:10) 阅读全文
posted @ 2013-04-25 23:57 tom0 阅读(112) 评论(0) 推荐(0)
摘要: <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"><hibernate-configuration> <session-factory> <property name="show_sql">false</propert 阅读全文
posted @ 2013-04-25 23:29 tom0 阅读(127) 评论(0) 推荐(0)
摘要: <?xml version="1.0" encoding="UTF-8"?><!-- - Application context definition for JPetStore's business layer. - Contains bean references to the transaction manager and to the DAOs in - dataAccessContext-local/jta.xml (see web.xml's "contextConfigLocation" 阅读全文
posted @ 2013-04-25 23:25 tom0 阅读(201) 评论(0) 推荐(0)
摘要: <?xml version="1.0" encoding="UTF-8"?><web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java 阅读全文
posted @ 2013-04-25 23:23 tom0 阅读(153) 评论(0) 推荐(0)