Java 包 package 关键字
http://www.verejava.com/?id=16992895490365
//包其实就是 文件夹 以 . 号隔开
package pack1;
import pack2.Wallet; //引用包 pack2 下面的 Wallet 类
public class Person
{
public Person()
{
Wallet w=new Wallet();
System.out.println(w.getMoney());
}
public static void main(String[] args)
{
new Person();
}
}
package pack2
public class Wallet
{
private double money;
public void setMoney(double money)
{
this.money=money;
}
public double getMoney()
{
return this.money;
}
}