Note of Chap5

本文深入探讨了Java中的构造函数、静态变量、静态方法和this关键字的作用,通过实例演示如何实现对象的初始化和共享状态管理。
Note of Chap5:
Overloading重载:eg:不同的构造方法。方法名同,参数列表异;
构造函数:生成对象,对象的实例变量进行初始化;类名同、无返回值类型。
static变量:不常用。公用对象,只初始一次,随使用而变化。由(类名.变量名)访问。
static方法:由(类名.方法名)访问。静态的方法不能访问非静态变量。
static常量:常用。static方法不能访问非静态变量
this关键字:在构造函数中调用其他的构造函数、在方法中获得调用该方法的对象


验证传对象参数不是传对象引用:
 * 而是得到对象引用的一个拷贝,传给相应参数,
 * 参数和原来的对象引用都指向同一个对象,
 * 对对象的操作都改变实际的对象。
 * 但是对参数的操作却并不能影响原来的对象引用,
 * 它们之间只是一个拷贝的关系。
chap-secrets=/path/to/file By default is chap-secrets=/etc/ppp/chap-secrets Specifies alternate chap-secrets file location. username-hash=hash1[,hash2] By default is not defined. Specifies hash chain to calculate username hash. hash1, hash2 are openssl known digest names (md5, sha1, etc). For example, username-hash=md5,sha1 means hash username through md5 and then binary result hash through sha1. Username have to be specified as hexadecimal dump of digest result.Password field have to be encrypted using smbencrypt (NT Hash part). encrypted=0|1 By default is disabled: encrypted=0 Specifies either chap-secrets is encrypted. Note: Encryption is incompatible with auth_chap_md5 module. To enable chap-secrets encryption ablity accel-ppp must be compiled with -DCRYPTO=OPENSSL (which is default). gw-ip-address=x.x.x.x[/mask] By default is not defined. Specifies address to use as local address of ppp interfaces if chap-secrets is used for IP address assignment. Mask is used for IPoE.2.5.2 Chap-secrets file example #client server secret ip-address speed user001 * password1 100.64.100.1 20480/10240 user002 * passowrd2 * 10240/10240 user003 * passowrd3 ip_pool1 10240 eth0.101 * eth0.101 ipoe_pool 20480 100.64.0.2 * 100.64.0.2 * • The first column contain username. • The second column is only keep for support chap secrets files standard. • The third column contain secret or password. • The fourth column may contain allocated ip address or pool name which configured in [ip-pool] section. • The fifth column contain rate-limit. 什么意思
最新发布
09-14
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值