There are 2 classes defined as below
public class A
{
class B b;
}
public class B
{
class A a;
}
compiler gives error. How to fix it?
Answer Posted / praveen
public class A
{
class B *b;
}
public class B
{
class A a;
}
| Is This Answer Correct ? | 0 Yes | 3 No |
Post New Answer View All Answers
What is oops?what is its use in software engineering?
Why is there no multiple inheritance?
How do you answer polymorphism?
What is an example of genetic polymorphism?
Is react oop?
What are oops functions?
They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?
What is coupling in oops?
Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.
What is polymorphism in oops with example?
What is the significance of classes in oop?
How is polymorphism achieved?
Prepare me a program for the animation of train
Why do pointers exist?
Can a varargs method be overloaded?