Pls...could any one tell me that whether we can access the
public data memeber of a class from another class with in
the same program.
Awaiting for your response Thanku

Answer Posted / saurabh

You can access by just creating the object of first class
and then using this object to access public member in
second class.

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are two types of polymorphism?

803


What is class in oop with example?

834


What is polymorphism and example?

777


What is encapsulation c#?

808


What is the difference between a constructor and a destructor?

853


What is abstraction encapsulation?

864


Why do we use inheritance?

821


What is polymorphism in oop example?

730


write a code for this. serial_number contained in the header of the file will be read , if this serial number is less than a previous serial number within a successfully processed file, or is the same as another serial number within a successfully processed file, or if the field contains anything other than 7 digits, then the file must error with the reason ‘Invalid SERIAL_NUMBER’.

1987


What is the problem with multiple inheritance?

824


What does sksksk mean in text slang?

1837


Why is encapsulation used?

769


What is the important feature of inheritance?

863


Can we create object of interface?

840


What is the difference between abstraction and polymorphism?

848