Latest Answer : it is the process by which child class acquires the properties of parent class. so an object in child class needn't carry its own defination of data and methods that are generic to parent class. ...
Latest Answer : Initially it didnt as java uses "extends" word for inheritance but it didnt allow us to extend more then one class.So the concept of "interface" came which is like abstrct class but with strictness that methods will only be declared at that place & have ...
Latest Answer : inheritance is an OOPS concept by which a class can acquire the characteristics of another class.The class from which its inheriting is called base class and the class which is inheriting is called sub class.class demo1{}class demo2 extends ...
Latest Answer : multiple inheritance is not allowed in java because to avoid naming collisions. ex:- if a class inherit two classes and let the two parent(base) classes have a method with same name. then child class will inherit only one of them , a naming collision ...
Latest Answer : B'coz there is a possibility of ambiguity while calling the the function if same function is exists in both the super classes. ...
Latest Answer : No, In Inheritance only the public and protected memberes of the base class can b inherited by the derived class. Private members r only accessible to the member functions of the class. ...
A) Encapsulation:Is the Mechanism that binds together code and the data it manipulates, and keeps both safe from outside interference and misuse.B) Inheritance:Is the process by which one object acquires
Latest Answer : of course...all the above... ...
A) Using interfaces.B) Using abstract classesC) Using final classesD) None of the above
Latest Answer : In java multiple inheritance is not allowed(but allowed in C++).In java you can have at most one direct base class. A base class can have many subclass. ...
A) Reusability of codeB) accessibility of variables of the superclass by subclasses.C) Accessibility of methods of the superclass by subclasses.D) a,b are true
Latest Answer : A) Reusability of codeB) accessibility of variables of the superclass by subclasses.C) Accessibility of methods of the superclass by subclasses. ...
Encapsulation : is the wrapping up of data . then what is the use of encapsulation & where it is being used.similarlly inheritance and polymorphism