摘要: 一个包中只能有一个public,可以有多个方法,例: class 1{static void A(String str) {System.out.println(str)}} class2{...} 静态变量属于类,与对象没有关系。 非静态变量属于某个对象的,每个对象都有相应的副本,静态变量是唯一的 阅读全文