Explain method overloading and overriding in Java
Method overloading defines multiple methods with the same name but different parameter lists within a class resolved at compile time; method overriding redefines an inherited instance method in a subclass with a compatible signature resolved at runtime.