Hello,
I was doing some experimenting and found that the following code compiles and runs without any exceptions or errors. But im not sure why.
01 final class Object {
02 Object() {
03 super();
04 }
05 }
06
07 public class ObjectTest {
08 public static void main (
String [] args) {
09 new Object();
10 }
11 }
I have the following questions about this:
a) In line "01", how can you declare class Object final, since all other classes implicitly extend it.
b) In line "03", what does the call to super() do, since Object has no superclass?
Thanks.