java this
2016-08-05 18:43
316 查看
this 代表什么
this 应用场景
When used as a primary expression, the keyword
注意点:
this 是对象的引用
The keyword
in the body of an instance method or default method
in the body of a constructor of a class
in an instance initializer of a class
in the initializer of an instance variable of a class
to denote a receiver parameter
this 应用场景
When used as a primary expression, the keyword
thisdenotes a value that is a reference to the object for which the instance method or default method was invoked , or to the object being constructed. The value denoted by
thisin a lambda body is the same as the value denoted by
thisin the surrounding context.
注意点:
this 是对象的引用
The keyword
thismay be used only in the following contexts:
in the body of an instance method or default method
in the body of a constructor of a class
in an instance initializer of a class
in the initializer of an instance variable of a class
to denote a receiver parameter
相关文章推荐
- java使用正则表达式提取方括号中内容
- Base64.java 工具类
- Spring Shedule Task之注解实现 (两次启动Schedule Task 的解决方案)
- java commons-lang 工具包 逃脱工具 转unicode 及其他
- java 2 8 10 16
- java 数据类型
- java tools: jmap
- java tools: jstack
- java tools: jstat
- java 指导 (Java Tutorial)
- spring 统一处理http request请求返回数据,返回加密信息等
- java 关键字
- Eclipse Debug代码调试
- JavaWeb中filter的详解及应用案例
- java -X 这不是标准的选项只是为了获取帮助信息
- eclipse查看 rt.jar 源码
- SQLite - Java服务端
- java单例模式,懒汉式和饿汉式的区别,双层锁式等
- java 抽象类
- java 接口