Polymorhism: is a feature of OOPl that at run time depending upon the type of object the appropriate method is called.Inheritance: is a feature of OOPL that represents the "is a" relationship
By using the static method there is no need creating an object of that class to use that method. We can directly call that method on that class. For example, say class A has static function f(), then
Latest Answer : static methods are class methods. in which we can use only static data varibles of any calss of the program. these methods are invoke with out create objects of corresponding the class. ...
virtual methods are used to use the polymorhism feature in C++. Say class A is inherited from class B. If we declare say fuction f() as virtual in class B and override the same function in class A then
Class ABC{static final float GRAVITATIONAL_CONSTANT = 9.8;public void getConstant(){system.out.println("Gravitational_Constant: " + GRAVITATIONAL_CONSTANT);}}
Latest Answer : class abc{ final const float PI=3.14f;} ...
Multiple inheritance is a feature in C++ by which one class can be of different types. Say class teachingAssistant is inherited from two classes say teacher and Student.
Latest Answer : A derived class if it inherits from more than one direct base class,it is call multiple inheritance. ...
Class C extends A implements B{}
The Object class is the highest-level class in the Java class hierarchy. The Class class is used to represent the classes and interfaces that are loaded by a Java program.
The ResourceBundle class is used to store locale-specific resources that can be loaded by a program to tailor the program's appearance to the particular locale in which it is being run.
The ObjectInputStream class supports the reading of objects from input streams.
this() is used to invoke a constructor of the same class. super() is used to invoke a superclass constructor.