Ok i know you java gurus gringe whenever you see the beginners question in a title.
Ok I understand the difference between extending interfaces and implementing classes the differences between overriding/overloading.
My question is, you can overload and i think over-ride any method that can be found by searching in the class path, and use that method in your class, obviously assuming it is correctly referenced in the class.
So when do you decide to extend a whole class or implement an interface or just use one method in your class. Are there any reasons not to the majority of the time just use the method. It seems to me early on in designing your application you will want to extend classes and implement interfaces as you are defining the structure of your program later on, or when the application is developed and you are playing with it testing it and then you will only want to use certain methods. Anything obvious i have missed here in this assumption.
Thanks guys.
Ok I understand the difference between extending interfaces and implementing classes the differences between overriding/overloading.
My question is, you can overload and i think over-ride any method that can be found by searching in the class path, and use that method in your class, obviously assuming it is correctly referenced in the class.
So when do you decide to extend a whole class or implement an interface or just use one method in your class. Are there any reasons not to the majority of the time just use the method. It seems to me early on in designing your application you will want to extend classes and implement interfaces as you are defining the structure of your program later on, or when the application is developed and you are playing with it testing it and then you will only want to use certain methods. Anything obvious i have missed here in this assumption.
Thanks guys.