900字范文,内容丰富有趣,生活中的好帮手!
900字范文 > java代码下划线是啥意思 在这个Java代码中 下划线实际上做了什么?

java代码下划线是啥意思 在这个Java代码中 下划线实际上做了什么?

时间:2021-02-06 12:05:35

相关推荐

java代码下划线是啥意思 在这个Java代码中 下划线实际上做了什么?

I just began to learn Java.

My friend who is helping me study just sent me this and said 'figure this out'.

Unfortunately I am unable to read this. It looks like Perl to me.

class _{_ _;_(){_=this;}}

What does it mean?

解决方案

_ is the class name. It's a very confusing one, but it works!

With the class renamed:

class Something {Something something;Something(){something=this;}}

And cleaned up:

class Something {

Something something;

Something() {

something=this;

}

}

And you can go crazy with this odd naming :)

class _{_ __;_ ____;_(){__=this;____=__;}_(_ ___){__=___;}}

In fact, Unicode is even supported, so this is valid:

class 合法類別名稱{合法類別名稱(){}}

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。