Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 / santhosh

class B;


public class A
{
B* b;
}
public class B
{
A a;
}

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is encapsulation in oops?

1016


What are the 4 main oop principles?

1226


Why interface is used?

1024


What is a class and object?

1056


What is the difference between static polymorphism and dynamic polymorphism?

1093


What are the components of marker interface?

1063


Are polymorphisms mutations?

1166


Can bst contain duplicates?

1199


Why is it so that we can have virtual constructors but we cannot have virtual destructors?

4956


What is polymorphism what is it for and how is it used?

1023


What are the data types in oop?

1104


Whats oop mean?

1054


What does sksksk mean in text slang?

2124


What is the oops and benefits of oops programming?

976


IS IT NECESSARY TO INITIALIZE VARIABLE? WHAT IF THE INSTANCE VARIABLE IS DECLARED final ? IS IT NECESSARY TO INITIALIZE THE final VARIABLE AT THE TIME OF THEIR DECLARATION?

2071