I'm struggling to know why method overloading and overriding needed in java?
I have read some articles regarding this but not able to catch why it's needed practically? i realize after so much searching that suppose we want to load a truck with many types of vegetables(potato and tomato). our simply target is to load these in truck.now there is two way for loads these vegetables in truck. 1. one 'बोरी(sack) we full it by potato and in other we full it by tomato. 2. in one sack we can full it by tomato & potato both and in 2nd sack we can full it by also potato & tomato. in both condition we are just load vegetables. if vegetables are larger in the compare of truck's loading capacity then all knows that we use one more truck for loading rest of vegetables. In whole time our target is just load these vegetables either it will come in one truck or more than one truck. so how we can say that this is overloading. Because on every sites of google and in every videos(example : watch video from 0:12 in given link below) everywhere overloading means to overload anything. So my question is why overloading needed and according to my example what is difference between in overloading or loading?