文章列表
public class OOP
{
public static void main(String[] args)
{
//使用第一种方法开始执行
UM.getUSB(new MP3());
System.out.println("-------------------------");
//使用工厂创建
USB usb = Factory.getFactory("U");
usb.start();
usb.stop();
}
}
interface USB
{
public void start();
p ...
- 2009-05-02 16:22
- 浏览 765
- 评论(0)
class Threaded
{
public static void main(String[] args)
{
C c = new C();
A a = new A(c);
B b = new B(c);
new Thread(a).start();
new Thread(b).start();
}
}
class A implements Runnable
{
C c = null;
public A(C c){
this.c = c;
}
public void run(){
for(int i = 0 ;i<10;i++){ ...
- 2009-05-02 16:12
- 浏览 782
- 评论(0)
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="com.lifeng.po.other">
...
<!-- 所有关于struts配置信息都在struts-config这个标签里面配置 -->
<struts-config>
[size=xx-large][/size]
<!-- form-beans 配置 form-bean信息 -->
<form-beans>
<form-bean name="form名字" type="form包.类" />
<!-- 如 -->
<form-bean name="form" type=&qu ...