内部类(nested classes),面向对象程序设计中,可以在一个类的内部定义另一个类。嵌套类分为两种,即静态嵌套类和非静态嵌套类。静态嵌套类使用很少,最重要的是非静态嵌套类,也即是被称作为内部类(inner)。内部类是JAVA语言的主要附加部分。内部类几乎可以处于一个类内部任何位置,可以与实例变量处于同一级,或处于方法之内,甚至是一个表达式的一部分。
该类的内部类(nested classes)在这搭会将会先容该类的全部内部类。想要查看某个内部类的具体信息,可以点这儿该内部类的链接,如许回跳到该内部类的文档界面。
基于82个网页-相关网页
内部类(inner clbum)是被定义于另一个类中的类,行使内部类的主要因由是由于: ◇ 一个内部类的对象可调查内部类的成员方法和变量,包含公有的成员。
基于24个网页-相关网页
可以使用匿名的内部类来实现闭包。
Primarily, you can use anonymous inner classes to implement closures.
反射使执行代码能够访问内部类信息。
Reflection gives your executing code access to internal class information.
内部类的事件处理方法如清单 2 所示。
The event handling method of the inner class is shown in Listing 2.
Many steroid hormones act because they bind to cellulars - to receptors that are deep within the cell, often inside the nucleus.
许多类固醇激素能够起效是因为,其与存在于细胞内部的受体相结合,这类受体通常在细胞核内
Again, I could have some other functions to compute things, but this is typically the place where I'm going to put them in.
注意这个声明典型的行为,就是为了定义了内部变量,以及类的内部特性,在说一次,我可以写一些。
应用推荐