The public key and the private key
2012-05-19 12:09
357 查看
1、内部类可以操作外部类中所有的成员方法和成员变量,包括private修饰过的。
2、内部类如果被声明为public,则可以到其他类中进行访问,如果声明为private,则内部类只属于所在的外部类(InnerClassTest.java中注释掉的部分就是错误的一个访问)。
3、外部类对其内部类的属性和方法的访问和访问其他类一样,需要先构造一个对象然后进行访问,不过对于内部类的构造首先要构造一个外部类,进而进一步进行构造内部类。
4、内部类编译生成的class文件的名称是外部类和内部类用一个$符号连接起来的形式,例如,我们上面的程序生成的内部类的class文件的名称分别为:
OuterClass$InnerClass1.class
OuterClass$InnerClass2.class
转自:http://redhacker.blueidea.com/archives/2006/2923.shtml
2、内部类如果被声明为public,则可以到其他类中进行访问,如果声明为private,则内部类只属于所在的外部类(InnerClassTest.java中注释掉的部分就是错误的一个访问)。
3、外部类对其内部类的属性和方法的访问和访问其他类一样,需要先构造一个对象然后进行访问,不过对于内部类的构造首先要构造一个外部类,进而进一步进行构造内部类。
4、内部类编译生成的class文件的名称是外部类和内部类用一个$符号连接起来的形式,例如,我们上面的程序生成的内部类的class文件的名称分别为:
OuterClass$InnerClass1.class
OuterClass$InnerClass2.class
转自:http://redhacker.blueidea.com/archives/2006/2923.shtml
相关文章推荐
- 如何让OpenSSL得到JKS格式的keystore中的public and private key
- Partial mock local private method or public method in the class and suppress static initial block
- 如何让OpenSSL得到JKS格式的keystore中的public and private key
- private key and public key
- C# SharpSsh Private-public a pair key to Upload and Download File
- Public Key and Private Keys
- mac curl: (58) SSL: Can't load the certificate and its private key: OSStatus -25299 的解决方案
- No valid signing identities (i.e. certificate and private key pair) matching the team ID “(null)” were found.
- No valid signing identities (i.e. certificate and private key pair) matching the team ID “(null)” were found.
- The difference between the private and public clouds
- SSH Man-in-the-Middle Attack and Public-Key Authentication Method
- Create an SSH public and private key pair for Linux VMs (转载)
- Summary: difference between public, default, protected, and private key words
- ruby merge array of hashes based on the key and order it by number of key/value pair
- Generate public key from private key in keychain
- public、protected、private in c++ and java
- Javascript Module pattern template. Shows a class with a constructor and public/private methods/properties. Also shows compatibility with CommonJS(eg Node.JS) and AMD (eg requireJS) as well as in a br
- Subscriber class xxx.xxx.xxx and its super classes have no public methods with the@Subscribe annotat
- 使用public/private key让putty(ssh)自动登录(以及linux上使用密钥做ssh自动登陆)
- Public Symbols and Private Symbols