Junilu Lacar wrote:
You can't override a static method that you define in an interface. Also, any non-static and non-default methods defined in an interface are implicitly public and abstract.
Junilu Lacar wrote:Unchecked exceptions like IllegalArgumentException are normally not caught in a try-catch block. Unchecked exceptions (RuntimeException and its subclasses) are normally a sign of buggy code so these should be allowed to propagate and be detected during program testing.
Junilu Lacar wrote:..
Like I said, there's no "rule" that says you have to store all values passed to a constructor in an instance variable. Using it to configure the class and then throw it away is also a perfectly fine and common approach. If there was a rule of thumb, I'd say it would be that any argument you pass to a constructor has to make sense logically and semantically.
Junilu Lacar wrote:Please clarify what you mean by "doesn't belong." In your example, do you mean to say that the size parameter doesn't belong to the FibonacciFinder class? How so?
Junilu Lacar wrote:
Campbell Ritchie wrote:
Kindly don't make that sort of change; I have reverted it. Yo managed to introduce a new error into that post by editing it.otherClaud Mann wrote:. . , I edited the post. . . .
Junilu Lacar wrote:
It is still X. Casting does not change the type of a reference variable, it allows you to assign that reference to another reference.