Answer Posted / pawan kumar
Virtual methods have an implementation and provide the derived classes with the option of overriding it. Abstract methods do not provide an implementation and force the derived classes to override the method. So, abstract methods have no actual code in them, and subclasses HAVE TO override the method.
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
There are two base class B1,B2 and there is one class D which is derived from both classes, Explain the flow of calling constructors and destructors when an object of derived class is instantiated.
What are the data types in oop?
What is Difference Between Inheritance and creating object and getting data? means Class A extends B{ B.getMethod();} (OR) Class A{ b obj=new B(); obj.getMethod(); }
If a=5, b=6, c=7, b+=a%c*2. What is the final value of b?
What is encapsulation with real life example?
Can an interface inherit a class?
Write a C++ program without using any loop (if, for, while etc) to print prime numbers from 1 to 100 and 100 to 1 (Do not use 200 print statements!!!)
What is the renewal class?
What is polymorphism in oops with example?
Why can't we have instance(stack) of a class as a member of the same class like eg.Class A{A obj;} as we can have self refential pointer
How do you define social class?
Why interface is used?
What is new keyword in oops?
What is abstraction in oops with example?
What is constructor overloading in oop?