if two files are in the same directory, it is assumed that the classes in these files are in the same package unless indicated otherwise. "javac" command searches for unknown classes in the same package automatically
解决方案 »
- 泛型接口的问题....
- 关于非静态变量的对象实例化
- 如何计算输入JTextField里字符串的长度?
- 请教用匿名内部类有何好处,多谢!
- java调用DLL的问题!急!
- 如何判断一个string中存储的是乱码?
- 还是关于JAR问题
- 几个java问题请专家看1下,对你是小菜,给高分!!!!!!!
- JRE 1.4下,如何更改Applet安全性让IE可以支持一个无签名,且有特殊操作的Applet
- struts上传文件抛Read timed out异常
- 怎样修改某个文件以便使weblogic6.1以developer mode方式运行?怎么使weblogic6.1自动重加载?
- 谁有scjp的模拟题的下载地址啊,谢谢,(一定给分)
如果不在一个目录的话需要import,并且需要设置classpath.
类有四种:public,private,protect和default(不用写)
开放性:public>protect>default>private
同一个package里面default开始的类都可以被共package的其他类访问
记错了请指正!