Can we call a base class method without creating instance?
Answer Posted / sanjay makwana, puna
e.g. class X
{
int x;
X()
{
cout << "X";
}
public :
static void fun()
{
cout << "fun";
}
};
you may called like
X::fun();
| Is This Answer Correct ? | 10 Yes | 3 No |
Post New Answer View All Answers
any one please tell me the purpose of operator overloading
Why do we use polymorphism in oops?
How do you define social class?
What is the renewal class?
Get me a number puzzle game-program
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(); }
What is multilevel inheritance explain with example?
What is overloading in oops?
Why do we use oops?
Why is destructor used?
Why do pointers exist?
What is object-oriented programming? Webopedia definition
What is difference between inheritance and polymorphism?
Why do we use inheritance?
What is coupling in oop?