package com.lunce; import com.lunce.lion.Dota2Hero; public class Dota2Hero { private String name; private static float dexterity; private static float strength; private static float intellectual; public void setDexterity(float newsDexterity){ dexterity=newsDexterity; System.out.println("sv的敏捷:"+dexterity); } public Dota2Hero(){} static { strength=10.0f;dexterity=10.0f; intellectual=10.0f;} public void property(float newDexterity){ dexterity=newDexterity; System.out.println("火女的敏捷是:"+dexterity); } public static void main(String[] args) { Dota2Hero lina=new Dota2Hero(); lina.property(15.0f); } }
下面是是另一个包的同类代码
package com.lunce.lion;
public class Dota2Hero {
float dexterity;
public Dota2Hero(){
System.out.println("hello");
}
}
狮子_白的lalala
相关分类