Friend Function Overload

Why friend function cannot be used to overload the assignment operator?

Questions by surendra_sahu786   answers by surendra_sahu786

Showing Answers 1 - 12 of 12 Answers

dheerendra

  • Sep 2nd, 2008
 

The concept operator overloading and friend function are supported by Java, by defaault only + operator is overloaded over string .

For example ---

String abc ="";
String s1="Hello";
String s2 = " Geek Interview";
abc = s1+s2;
Sop(abc);
would print Hello Geek Interview

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions