摘要: public class Demo6{ public static void main(String args[]){ for(int i=0;i<100;i++){ System.out.println("----main----"+i); } Thread t1=new Thread(new T1()); t1.start(); }}class T1 implements Runnable{ public void run(){ for(int i=0;i<100;i++){ if(i==5){ try{ Thread.sleep(3000); }ca... 阅读全文
posted @ 2013-03-08 19:00 stt_spring 阅读(151) 评论(0) 推荐(0)
摘要: public class Test{ public static void main(String args[]){ T1 t1=new T1(1); t1.start(); T1 t2=new T1(2); t2.start(); }}class T1 extends Thread{ public static Object o1=new Object(); public static Object o2=new Object(); int num; T1(int num){ this.num=num; } public void run(){ ... 阅读全文
posted @ 2013-03-07 22:09 stt_spring 阅读(125) 评论(0) 推荐(0)
摘要: public class Poi { public static void main(String[] args) { HSSFWorkbook workbook=new HSSFWorkbook(); HSSFSheet sheet=workbook.createSheet(); HSSFRow row=sheet.createRow(0); HSSFCell cell00=row.createCell(0); HSSFCell cell01=row.createCell(1); cell00.setCellValue("学生姓名"); cell01.setCellVal 阅读全文
posted @ 2013-03-06 19:40 stt_spring 阅读(182) 评论(0) 推荐(0)
摘要: SSH整合一、导包Hibernate里面的包:(1)hibernate核心包(2)Required里面的包(3)Jpa里面的包(4)Bytecode——cglib里面的包Sl4j里面的:slf4j-1.5.8——slf4j-nop-1.5.8.jar数据库的连接包:mysql-connector-java-5.0.4-bin.jarSpring里面的包:(1)dist里面所有的包(2)依赖包reqlib——commons-logging.jar(3)Aop里面所有的包(4)连接池jdbc的包reqlib——commons-dbcp.jar和Reqlib——commons-pool... 阅读全文
posted @ 2012-11-21 22:51 stt_spring 阅读(209) 评论(0) 推荐(0)
摘要: Hibernate_01一、要导的包:1、核心包2、Required里面的全部3、Bytecode—>cglib....4、Slf4j—nop—1.5.8.jar二、copy配置文件:hibernate.cfg.xml放入src下project—>etc—>hibernate.cfg.xml并将其改成如下:<hibernate-configuration><session-factory><propertyname="current_session_context_class">thread</property&g 阅读全文
posted @ 2012-11-02 22:17 stt_spring 阅读(162) 评论(0) 推荐(0)