There are 2 classes . Class A and Class B. In Class A i declared
a variable in private. if we can access this private variable in
Class B. If yes means , how we can access ?

Answer Posted / deepak sarao

with the help of friend function u can access private of
class A in class B

Is This Answer Correct ?    5 Yes 19 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is java called technology?

503


What is j2ee product?

491


What are the main components of a class in java?

494


Since we can create managed bean by two ways as, we can define the bean name in faces-config.xml file so that page can use that OR we can write annotation on bean class so that it is automatically assign to page but I want to know which one is good programming practice ? And also mention disadvantage of other which should not prefer ... Thanking you...

1888


What is javabeans component?

531






What is form-based authentication?

536


What is basic authentication?

549


Is string an object in java?

463


Is c++ more secure than java?

503


What is non primitive data type in java?

496


Who gave the name java?

471


What is devops in java?

526


What is a thin client?

581


What is j2ee technology?

552


What will happen when you compile and run the following code?

521