I was going through this code and kind of need help to understand a part of it.
What effect does this statement have on the program especially "final MainWindow this$0;" and "this$0 = MainWindow.this; super();". From What I understand super() should be the first statement of the class. So I think it is useless to have such code in a program. Kindly help me clarify this.
Did you decompile this code? Because the this$0 is a reference to the instance of the enclosing class, and usually it's implicitly added by the compiler. I've never seen anyone add it manually.
Another giveaway about you (or someone else) having decompiled it is the assignment to this field before the call to super(); that's not allowed, and won't compile again.
Every non-static inner class instance, even that of an anonymous one, has a reference to an outer class instance, in context of which it is instantiated. Compiler provides it without us needing to make it explicit in code. When we decompile the code, some of this compiler "magic" also gets decompiled and printed in the output.
You can safely delete the lines 8 and 12 in your code below:
Thank you for the clarification. I understand it perfectly now. Rob thanks for the answer, I didn't decompile the code it is an assignment given to me to read trough. May be my tutor did. Thanks anyway.