标签:prot 程序 cte nbsp ati str 文件 class 是你
1、一个.java文件至多有一个public方法:
class T { private int i; int j; protected int k; public int L; } /* 1、 一个.java文件只允许出现一个 public class ,且用 public 修饰的类名作为文件名 2、 该文件名为Test.java,程序主类可用public修饰,也可以不用 如果是给外部程序调用 ,必须使用public 如果是你包中的内部程序调用,则可以不必指定为public */ class Test{ public static void main(String[] args) { T t = new T(); System.out.println(t.j); } }
标签:prot 程序 cte nbsp ati str 文件 class 是你
原文地址:http://www.cnblogs.com/wmjlh/p/7255425.html