摘要: 1.使用static声明属性 static声明全局属性2.使用static声明方法 直接通过类名调用3.注意点 使用static方法的时候,只能访问static声明的属性和方法,而非static声明的属性和方法是不能访问的 1 package com.example; 2 3 /** 4 * Cre 阅读全文
posted @ 2017-01-14 23:47 894316728 阅读(257) 评论(0) 推荐(0)
摘要: 1.表示类中的属性和调用方法 1 package com.example; 2 3 /** 4 * Created by Y on 16/4/13. 5 */ 6 public class People { 7 private String name; 8 private int age; 9 10 阅读全文
posted @ 2017-01-14 18:20 894316728 阅读(100) 评论(0) 推荐(0)