弱弱的问下这道题目为什么选ABD求教谢谢

来源:学生作业帮助网 编辑:六六作业网 时间:2024/05/16 16:48:03
弱弱的问下这道题目为什么选ABD求教谢谢弱弱的问下这道题目为什么选ABD求教谢谢弱弱的问下这道题目为什么选ABD求教谢谢成员变量xy都能被内部类访问到;内部类无法访问方法的局部变量,所以无法访问jfi

弱弱的问下这道题目为什么选ABD求教谢谢
弱弱的问下这道题目为什么选ABD

求教谢谢

弱弱的问下这道题目为什么选ABD求教谢谢
成员变量 x y 都能被内部类访问到;
内部类无法访问方法的局部变量,所以无法访问 j
final 修饰则为常量!
具体自己百度:
Cannot refer to a non-final variable j inside an inner class defined in a different method
网上太多了,还有点深