answersLogoWhite

0


Best Answer

Private members would be accessible only within their respective classes or via public accessor methods.

The behavior of member variables would depend only on their access modifier and would not change irrespective of the type of inheritance used.

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Show the behavior of private number while implementing multiple inheritance in java?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Multiple inheritance in java?

Actually, java does not support multiple inheritance. You can achieve partial multiple inheritance using interfaces but java is not like C or C++ where you can do direct multiple inheritance. However, you can achieve partial multiple inheritance with the help of interfaces. Ex: public class FerrariF12011 extends Ferrari implements Car, Automobile {


What do you mean when you say that Java has two concepts?

You are talking about the implementation point view of Abstract class and the interface. Let's go. 1. Interface helps Multiple inheritance:- In java you can't have a class inherited from more than one class, i.e. the multiple inheritance. Interface helps us in implementing the multiple inheritance(virtually), because their is no such restriction in implementing more than one interface. But the Abstract class can't help you doing so. 2. Interface helps global declaration:- In C/C++, a header file holds the declaration of the functions and the symbolic constants. Similarly we can have a interface which is having only the symbolic constants which is same for all classes which implements it. And also the method have only the signature and the class which implements it is free to write the body at his own wish. Abstract class can't help in doing this. 3. Abstract class is more secure:- Because in Interface we have all the things public. But in Abstract class we can have private and also friendly members. 4. Interface is overhead:- Because in Interface we are bound to implement all the methods though some of them we actually need. But in case of the Abstract class we can override the methods which we want.


What is public derivation in object-oriented programming?

Public derivation or public inheritance means that all the public members of the base calls are declared public in the derived class while the protected members remain protected. Protected inheritance means all the public members of the base class are declared protected in the derived class, as are the protected members. Private inheritance means all the public and protected members of the base class are declared private in the derived class. Private members of the base class are never inherited and are therefore unaffected by inheritance. Note that regardless of the type of inheritance specified, individual non-private members of the base class can be inherited with public or protected access as required of the derived class. The type of inheritance can be therefore be thought of as being the default inheritance for all base class members which can (optionally) be overridden for specific members where required.


Can you chat with the mindless behavior boys in private?

yes


Difference bitween various visibility modes used c plus plus?

By visibility I assume you mean member accessibility. C++ uses three levels of accessibility: private, protected and public. Private members are only accessible to the class itself and friends of the class. Protected members are the same as private members except derived classes also have access. Public members are fully accessible. With regards inheritance, base class members with greater access than that specified are reduced to the specified access in the derived class. Thus public inheritance has no effect on base class member access. Protected inheritance reduces public members of the base class to protected members of the derived class. Private inheritance reduces both public and protected members of the base class to private members of the derived class. Private members of the base class are never inherited, thus they always remain private to the base class. Note that access to base class members can never be increased through inheritance, only reduced or kept the same. However, as well as defining an overall inheritance access, you can also specify member-wise inheritance access. Thus you could use public inheritance overall, but specify certain public members of the base class to be protected or private in the derived class and/or certain protected members of the base class to be private members of the derived class.


Does due process of law apply to private ownership of property?

If you are speaking about disputes over ownership or inheritance of it, yes, it does.


How does inheritance promote code reuse?

One of the earliest motivations for using inheritance was the re-use of code which already existed in another class. This practice is usually called implementation inheritance.In most quarters, class inheritance for the sole purpose of code re-use has fallen out of favor.The primary concern is that implementation inheritance does not provide any assurance of polymorphic substitutability-an instance of the re-using class cannot necessarily be substituted for an instance of the inherited class. An alternative technique, delegation, requires more programming effort but avoids the substitutability issue. In C++ private inheritance can be used as form of implementation inheritance without substitutability. Whereas public inheritance represents an "is-a" relationship and delegation represents a "has-a" relationship, private (and protected) inheritance can be thought of as an "is implemented in terms of" relationship.


Can mindless behavior come to your school for a free private concert?

Probably not.


Which is the best price online for purchasing Saving Private Ryan dvd?

The best price one can find online for purchasing the Private Ryan DVD is Ebay. Here multiple offers can be made on multiple posts regarding Private Ryan.


What would a corporation use to allow private IPv4 addresses to communicate with the Internet?

NAT in the router Implementing ipv6 would be a better option.


Rate causes and solutions to unemployment in Nigeria?

by implementing every sector in nigeria weather private or public sector and morealso regulating the financial economy


How can you get in reach with mindless behavior?

Call their private number 323-319-6060