Javatpoint Logo

what is Friend function in java?

By: khanna*** On: Fri Sep 27 10:16:49 EDT 2013     Question Reputation0 Answer Reputation0 Quiz Belt Series Points0  0Blank User
was asked in newgen interview...Up0Down

 
Java does not have the friend keyword that is in c++

friend function of a class is defined outside that class' scope but it has the right to access all private and protected members of the class. Even though the prototypes for friend functions appear in the class definition, friends are not member functions.
Image Created0Down

By: [email protected] On: Sat Sep 28 02:16:10 EDT 2013 Question Reputation0 Answer Reputation392 Belt Series Points0 392User Image
Are You Satisfied :2Yes0No
 
Image Created0Down

By: [email protected] On: Thu Aug 27 20:59:20 IST 2015 Question Reputation0 Answer Reputation0 Belt Series Points0 0User Image
Are You Satisfied :0Yes0No
 
Image Created0Down

By: [email protected] On: Mon Aug 01 18:17:19 IST 2016 Question Reputation0 Answer Reputation0 Belt Series Points0 0User Image
Are You Satisfied :0Yes0No
 
Image Created0Down

By: [email protected] On: Mon Aug 01 18:17:48 IST 2016 Question Reputation0 Answer Reputation0 Belt Series Points0 0User Image
Are You Satisfied :0Yes0No
 
Image Created0Down

By: [email protected] On: Mon Aug 01 18:18:49 IST 2016 Question Reputation0 Answer Reputation0 Belt Series Points0 0User Image
Are You Satisfied :0Yes0No