1) Yes, it is a constructor. The fact that it has the same name as the class and doesn't have a return type would indicate this.
2) There is only one argument, it is called oldSphere and its type is a Sphere, which has been declared final.
3) The use of final in this example has been done to ensure that the object reference for oldShpere cannot be modified. It isn't stritcly necessary in an example this trivial, but I'm assuming that Ivor did do so to showcase another use of the final keyword, this time with method parameters and also to indicate good programming style, as he is clearly stating that the original object reference cannot be changed in this constructor.
I hope this helps
Cheers
Martyn
|