Operator Overloading - Java?
Iv not been able to find anything on this, and if i could get a response to this in the next couple of hours that would be great :)
Basically, is it possible? iv always found operator overloading helpful in C++, and i was hoping i could do something similar with Java, but i cant find how to do this? If anyone could let me know how its done it would be greatly appreciated :) Otherwise il just have to live without =/ |
Im pretty sure it can't be done. Java apparently doesn't have this feature. I wish it did. Was very nice when I was doing C++.
|
no-can-do I'm afraid what are you trying to do anyway? I might be able to suggest a way 2 do it in java.
|
Java doesn't support operator overloading.
|
Java doesn't offer users operator overloading. But it uses operator overloading. The "+" symbol in print statements is an overloaded operator. But the Java creator's thought that programmer's don't need this feature and so didn't provide it.
The prescribed method is to use functions, functions and more functions. You can use function overloading though, which is helpful :). |
All times are GMT -5. The time now is 05:11 PM. |