<a href="http://www.wi.hs-furtwangen.de" target="_blank" rel="nofollow">Business Information Technology - Hochschule Furtwangen University, Germany</a>
In the above class C,are we implementing the method methA declared in interface B or we overriding the method of class B?
public class C extends A implements B
For the above line, class C is overridding the method of class A.
If the line would be:
public class C implements B extends A
Then, class C will implement method of interface B.
Originally posted by rathi ji:
I think, the whole game is behind this line:
public class C extends A implements B
For the above line, class C is overridding the method of class A.
If the line would be:
public class C implements B extends A
Then, class C will implement method of interface B.
How I derived this point:
Remove the methA() method from class C and change the order of extends and implements (class and interface).
But Really not sure, and good question Peru.
Originally posted by rathi ji:
I think, the whole game is behind this line:
...
How I derived this point:
Remove the methA() method from class C and change the order of extends and implements (class and interface).
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Originally posted by Stan James:
You do have a mild risk that A documentation says "methA displays the distance to the sun in millifurlongs" and the doc for B says "methA displays the number of uncles a monkey has". The only choice then would be to implement methA to execute the "halt and catch fire" byte-code instruction.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Don't get me started about those stupid light bulbs. |