在类构造函数中,我尝试使用:
if(theObject != null)
this = theObject;
Run Code Online (Sandbox Code Playgroud)
我搜索了数据库,如果记录存在,我使用theObject的Hibernate查询生成.
为什么我不能使用this?
this不是变量,而是值.你不能this在表达式中使用左值.
| 归档时间: |
|
| 查看次数: |
602 次 |
| 最近记录: |