How does Casting limit Algorithm Reuse in java? -


We are now learning about these two things in the Java class. I believe that I understand the basic aspects of both, but it is not certain how casting has to be restrained by algorithm reuse. Our teacher said that we need to know this for testing next week. Can anyone explain this?

If you have inserted then you should only limit your algorithm to work with a class (or class) Are they kids). If you used to use an interface instead, you would be able to accept a large variety of objects that apply the interface themselves. more flexible.

Here is a related SO question:


Comments