跳过导航
What is non denotable type? José Paumard breaks it down.
0:00 / 0:55

What is non denotable type? José Paumard breaks it down.

Java

58万 位关注者

在 X 上查看
115 个赞下载原帖

11,467 次观看

What is non denotable type? José Paumard breaks it down.

1 条评论

评论来自 X (Twitter) 上的原帖

  • Андрей Овчаренко 的头像

    @kreout

    @JosePaumard var x = new Object() { int n = 1; }; System.out.println(x.n); This works because var retains the anonymous class's type. Change only var to Object and x.n no longer compiles. A small example where replacing var changes which members are accessible.