Both of them are valid syntax and they show that you can use certain symbols as variable names as well as class names. It also shows you that you can create a final instance member without setting it straight away, but you HAVE to set it in the constructor or in an instance block but like above, you can only set it ONCE.
Now for the freaky stuff.
CAUTION: This is not best practise, DO NOT do this when programming
public class _ { public int _ = 0; public final int __; public _() { this._++; this.__ = 5; } public static void main(final String... arguments) { final _ _ = new _(); System.out.println("_ = " + _._); } }
public class $ { public final int £; public int $ = 0; public $() { this.$++; this.£ = 5; } public static void main(String... arguments) { final $ $ = new $(); System.out.println("$ = " + $.$); } }
And also the conclusion to the post above this one is that all Java developers are farmers
Happy coding! Enjoy!
// Json