For overriding both mention in addition to signature of the method must rest same, but inward for overloading method, the signature must hold upwardly different. For example, a private, static in addition to concluding method cannot hold upwardly overriding inward Java but you lot tin all the same overload them. Also rules of overriding or overloading a method are dissimilar inward Java. Though the mention of the method remains same inward the instance of both method overloading in addition to overriding, original divergence comes from the fact that method overloading is resolved during compile time, piece method overriding is resolved at runtime.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |