本帖最后由 freehello 于 2015-9-12 15:54 编辑
- package a;
- import b.Democ;
- class Demob extends Democ {
- public void show() {
- super.show();
- }
- public void s() {
- new Democ().show(); //这个为什么访问不到
- }
- }
- -----------------------------------------------------------------------------------------
- package b;
- public class Democ {
- protected void show() {
- System.out.println("democ");
-
- }
- }
复制代码
|
|