Java--static interface
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的更多相关文章
- Java Native Interface 六JNI中的异常
本文是<The Java Native Interface Programmer's Guide and Specification>读书笔记 在这里只讨论调用JNI方法可能会出现的异常, ...
- Java Native Interface 五 JNI里的多线程与JNI方法的注册
本文是<The Java Native Interface Programmer's Guide and Specification>读书笔记 JNI里的多线程 在本地方法里写有关多线程的 ...
- Java Native Interface 四--JNI中引用类型
本文是<The Java Native Interface Programmer's Guide and Specification>读书笔记 JNI支持将类实例和数组类型(如jobjec ...
- Java Native Interface 二 JNI中对Java基本类型和引用类型的处理
本文是<The Java Native Interface Programmer's Guide and Specification>读书笔记 Java编程里会使用到两种类型:基本类型(如 ...
- Java Native Interface 编程系列一
本文是<Java Native Interface Programmer's Guide and Specification>的读书笔记 Java Native Interface可以让编 ...
- Java注释@interface的用法【转】
Java用 @interface Annotation{ } 定义一个注解 @Annotation,一个注解是一个类.@Override,@Deprecated,@SuppressWarnings为 ...
- Java注释@interface的用法
转---------- java用 @interface Annotation{ } 定义一个注解 @Annotation,一个注解是一个类.@Override,@Deprecated,@Suppr ...
- Java Native Interface Specification—Contents
http://docs.oracle.com/javase/7/docs/technotes/guides/jni/spec/jniTOC.html 1. Introduction Java Nati ...
- Java Interface是存放常量的最好地方吗?(转)
虽然Inteface中默认常量就是static final 的.因此很多人就认为其实存放常量的最佳地方,effective java中就提过,不建议使用常量接口.其有一个原因就是:代码编译问题 好,我 ...
- Java接口interface
Java接口interface 1.多个无关的类可以实现同一个接口. 2.一个类可以实现多个无关的接口. 3.与继承关系类似,接口与实现类之间存在多态性. 接口(interface)是抽象方法和常量值 ...
随机推荐
- ajax get/post
xmlhttp.open("POST", url, true); xmlhttp.setRequestHeader("Content-Type", " ...
- Codeforces 518D Ilya and Escalator
http://codeforces.com/problemset/problem/518/D 题意:n个人,每秒有p的概率进电梯,求t秒后电梯里人数的期望 考虑dp:f[i][j]代表第i秒有j个人的 ...
- java classpath import package 机制 @Java的ClassPath, Package和Jar
java classpath import package 机制 從一個簡單的例子談談package與import機制 基本原則:為什麼需要將Java文件和類文件切實安置到其所歸屬之Package ...
- UML--核心元素之包
包是一种容器,如同文件夹一样. 包是UML非常常用的一个元素,它最主要的作用就是容纳并为其他元素分类.包可以容纳用例.业务实体.类图等,也包含子包. 分包的原则 1.如果将元素分为三个包A.B.C,那 ...
- 方案:解决 wordpress 中 gravatar 头像被墙问题
Gravatar头像具有很好的通用性,但是却遭到了无辜的拦截,对于无法加载头像URL,我们在WordPress系统中通过修改默认的URL链接可以达到恢复头像的功能. 修改文件路径为 /wp-inclu ...
- 【编译原理】语法分析LL(1)分析法的FIRST和FOLLOW集
近来复习编译原理,语法分析中的自上而下LL(1)分析法,需要构造求出一个文法的FIRST和FOLLOW集,然后构造分析表,利用分析表+一个栈来做自上而下的语法分析(递归下降/预测分析),可是这个FIR ...
- hdu 1429 胜利大逃亡(续)(bfs+状态压缩)
Problem Description Ignatius再次被魔王抓走了(搞不懂他咋这么讨魔王喜欢)…… 这次魔王汲取了上次的教训,把Ignatius关在一个n*m的地牢里,并在地牢的某些地方安装了带 ...
- string字母排序,
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.T ...
- python高级编程之元类(第3部分结束)
# -*- coding: utf-8 -*- # python:2.x __author__ = 'Administrator' #元编程 #new-style类带来了一种能力,通过2个特殊方法(_ ...
- UITableView 滚动时隐藏键盘
#pragma mark - UItableView滚动时收键盘 - (void)scrollViewWillBeginDragging:(UITableView *)scrollView { [se ...