?java类

2019年2月14日20:49:12 发表评论 957 views
/**
 * Created by xabcd on 2019/2/14.
 */
public class java_class2 {
    class colordefine {
        String color = "黑色";

        void getMes() {
            System.out.println("定义类");
        }


        public static void main(String args[]) {
            {
                colordefine b = new colordefine();
                System.out.println(b.color);
                b.getMes();
            }
        }
}

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: