如何进行Java的属性初始化步骤1:对象属性初始化对象属性初始化有3种声明该属性的时候初始化构造方法中初始化初始化块.publicclassHero{publicStringname="somehero";//声明该属性的时候初始化prot…