在这个Java代码中,下划线实际上做了什么? [英] What is the underscore actually doing in this Java code?
本文介绍了在这个Java代码中,下划线实际上做了什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我刚刚开始学习Java。
I just began to learn Java.
我帮助我学习的朋友刚刚给我发了这个并说'搞清楚'。
My friend who is helping me study just sent me this and said 'figure this out'.
不幸的是我无法读到这个。对我来说它看起来像Perl。
Unfortunately I am unable to read this. It looks like Perl to me.
class _{_ _;_(){_=this;}}
这是什么意思?
推荐答案
_
是类名。这是一个非常令人困惑的,但它的确有效!
_
is the class name. It's a very confusing one, but it works!
重命名的课程:
class Something {Something something;Something(){something=this;}}
清理:
class Something {
Something something;
Something() {
something=this;
}
}
你可以用这个奇怪的命名来疯狂:)
And you can go crazy with this odd naming :)
class _{_ __;_ ____;_(){__=this;____=__;}_(_ ___){__=___;}}
事实上,甚至支持Unicode,所以这是有效的:
In fact, Unicode is even supported, so this is valid:
class 合法類別名稱{合法類別名稱(){}}
这篇关于在这个Java代码中,下划线实际上做了什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文