http://stackoverflow.com/questions/8374646/what-is-a-static-interface-in-java

http://stackoverflow.com/questions/71625/why-would-a-static-inner-interface-be-used-in-java

Static inner interface and inner interface is the same, all access rules are the same as with inner static class. So inner interface can be accessible only if you have access to its parent class/interface. In case below you will have access to interface B only from package of interface A, because A has default access modifier. BTW: interface B could be static or not.

 interface A {
void testA();
public interface B {
void testB();
}
}

The static modifier is only allowed on a nested classes or interfaces.

Java--static interface的更多相关文章

  1. Java Native Interface 六JNI中的异常

    本文是<The Java Native Interface Programmer's Guide and Specification>读书笔记 在这里只讨论调用JNI方法可能会出现的异常, ...

  2. Java Native Interface 五 JNI里的多线程与JNI方法的注册

    本文是<The Java Native Interface Programmer's Guide and Specification>读书笔记 JNI里的多线程 在本地方法里写有关多线程的 ...

  3. Java Native Interface 四--JNI中引用类型

    本文是<The Java Native Interface Programmer's Guide and Specification>读书笔记 JNI支持将类实例和数组类型(如jobjec ...

  4. Java Native Interface 二 JNI中对Java基本类型和引用类型的处理

    本文是<The Java Native Interface Programmer's Guide and Specification>读书笔记 Java编程里会使用到两种类型:基本类型(如 ...

  5. Java Native Interface 编程系列一

    本文是<Java Native Interface Programmer's Guide and Specification>的读书笔记 Java Native Interface可以让编 ...

  6. Java注释@interface的用法【转】

    Java用  @interface Annotation{ } 定义一个注解 @Annotation,一个注解是一个类.@Override,@Deprecated,@SuppressWarnings为 ...

  7. Java注释@interface的用法

    转---------- java用  @interface Annotation{ } 定义一个注解 @Annotation,一个注解是一个类.@Override,@Deprecated,@Suppr ...

  8. Java Native Interface Specification—Contents

    http://docs.oracle.com/javase/7/docs/technotes/guides/jni/spec/jniTOC.html 1. Introduction Java Nati ...

  9. Java Interface是存放常量的最好地方吗?(转)

    虽然Inteface中默认常量就是static final 的.因此很多人就认为其实存放常量的最佳地方,effective java中就提过,不建议使用常量接口.其有一个原因就是:代码编译问题 好,我 ...

  10. Java接口interface

    Java接口interface 1.多个无关的类可以实现同一个接口. 2.一个类可以实现多个无关的接口. 3.与继承关系类似,接口与实现类之间存在多态性. 接口(interface)是抽象方法和常量值 ...

随机推荐

  1. 安装wampserver2时出现的问题

    提示丢失MSVCR100.dll 如果安装其他软件也是同样的提示情况,估计也是这个原因,以下分别是32位与64位的VC10下载地址: VC10 SP1 vcredist_x86.exe 32 bits ...

  2. content的定义

    http://www.myexception.cn/HTML-CSS/1472528.html http://stackoverflow.com/questions/2770681/css-conte ...

  3. Keil C51必须注意的一些有趣特性

    Keil c51号称作为51系列单片机最好的开发环境,大家一定都很熟悉.它的一些普通的特性大家也都了解,(书上也都说有)如:因为51内的RAM很小,C51的函数并不通过堆栈传递参数(重入函数除外),局 ...

  4. Spring使用小结2

    之前做过不少spring想过知识点内容的摘录, Spring框架的特点.模块组成.优缺点 spring相关的bean管理想过知识点及依赖注入方式 今天说下近端时间中项目中遇到的相关印象比较深的知识点 ...

  5. awk笔记1

    grep: 文本过滤器    grep 'pattern' input_file ... sed:流编辑器 awk: 报告生成器    格式化以后,显示 AWK a.k.a. Aho, Kernigh ...

  6. hdu 5344 MZL's xor(数学之异或)

    Problem Description   MZL loves xor very much.Now he gets an array A.The length of A ≤i,j≤n) The xor ...

  7. Direct3D 2D文本绘制

    现在学习下Direct3D在窗口中绘制一些文本信息,ID3DXFont接口负责创建字体和绘制二维的文本.我们介绍下ID3DXFont的用法. 1.创建LPD3DXFONT接口 LPD3DXFONT g ...

  8. pyqt listview基础学习01

    from decimal import * from PyQt4.QtGui import * from PyQt4.Qt import * from PyQt4.QtCore import * im ...

  9. xcode5下面安装Command Line Tools

    运行命令 sudo xcode-select --install 就会显示一行文字,并且弹出一个对话框,确认安装后他就会自己下载来安装了. 至此,Command Line Tools就能够重新复活了

  10. hdu 1728 逃离迷宫(dFS+优先队列)

    求转弯最少的走路方式!!!! #include<stdio.h> #include<string.h> #include<queue> using namespac ...