0 votes
in JAVA by
Describe overloading and overriding in Java?

1 Answer

0 votes
by

Both overloading and overriding allow you to write two methods of different functionality but with the same name, but overloading is compile time activity while overriding is run-time activity. Though you can overload a method in the same class, but you can only override a method in child classes. Inheritance is necessary for overriding.

Related questions

0 votes
asked Jun 16, 2019 in JAVA by reins.robin
0 votes
asked Jun 16, 2019 in JAVA by reins.robin
...