In java it is not possible to overloading OPERATOR such as +/-/* etc. We can do that is C++.
In java there won't be any friend function.

1 User has rated as useful.
Login to rate this answer.
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
Login to rate this answer.
In Java it is not possible to overloading OPERATOR such as +/-/* etc. We can do that is C++.
In Java there won't be any friend function. ...
That is why we can't use friend function overloading in Java
Login to rate this answer.
Java is actually designed to work same as C++ but avoid complex features like operator overloading, friend functions, multiple inheritence.

1 User has rated as useful.
Login to rate this answer.