Java Interview
Java Interview
com/aptitude/quantitative
Logical Reasoning : https://www.javatpoint.com/reasoning
Verbal Ability : https://www.javatpoint.com/verbal-ability
https://www.javatpoint.com/corejava-interview-questions
https://www.geeksforgeeks.org/java-interview-questions/
# method overriding : when two or more name are same and they are having also same
parameter is called method overriding, it is solved by runt time polymorphism.
# method overloding : when two or more name are same and they are having different
different parameter is called method loading , it is solved by compile time
polymorphism.
# polymorphism :
https://youtube.com/shorts/4VUqKrnjJo0?si=7k0Zd5qSmY8M8C8M
# Polymorphism :
Polymorphism nothing but an object can have different behaviours is known as
polymorphism.
When I say polymorphism it has derived into two types
1) compile time polymorphism
2) run time polymorphism
The compile time binding between the method calling statement and the method
implementation of overloaded method takes place during the compilation.
Ex:method overloading, constructor overloading
2) the bind between method calling statement and the implementation of overloaded
method takes place during the run time is known as run time polymorphism
Ex:method overriding.
The process of overriding the non static method implementation by sub class non
static method implementation within the sub class object is known as method
overriding
To achieve we have to follow certain rules
^inheritance is mandatory
^the non static method declaration of super class and sub class must be same
^the scope and visiability of subclass non static method declaration with respect
to access modifier must be similar or more than that of super class non static
method.