Question: Fill in the main) method, replacing the //FIXME comment in its body, so that it creates an object of class Point whose fields contain the

 Fill in the main) method, replacing the //FIXME comment in its

Fill in the main) method, replacing the //FIXME comment in its body, so that it creates an object of class Point whose fields contain the values x 20 and y 16 and then changes the value of x to 10 and y to 97. [10 marks] Question 2 (Generics, 15 marks) Given the following class definitions interface A . . .h interface B f... interface C extends A, B .. . class X implements A ..) class Y extends X implements B class Z implements B... class P f... class Q extends PKE class R extends Q .. say whether each of the following variable declarations is valid or invalid, and give a brief explanation of your answer: (a) Q foo; (b) PKC> foo (c) R foo; 5 marks] [5 marks) 5 marks Page 2 of 12

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!