| Author |
Operator Overloading
|
vamsee
Greenhorn
Joined: Sep 04, 2004
Posts: 1
|
|
|
Some one told me that it is possible to achieve operator overloading in JAVA. Whether it is possible, if so how to achieve it.
|
 |
Ilja Preuss
author
Sheriff
Joined: Jul 11, 2001
Posts: 14112
|
|
|
No, it's not possible. He probably confused it with method overloading.
|
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
|
 |
Vicken Karaoghlanian
Ranch Hand
Joined: Jul 21, 2003
Posts: 522
|
|
Operator overloading is not supported in Java. You may want to try Groovy, i have never used it before and i have no idea how it works. Operator overloading has been criticized a lot because it allowed developers to give operators different functionality depending on the types of their operands. From my personal point of view there is no need to implement it in java. It is simply... too complicated and confusing.
|
- Do not try and bend the spoon. That's impossible. Instead, only try to realize the truth. <br />- What truth? <br />- That there is no spoon!!!
|
 |
Dirk Schreckmann
Sheriff
Joined: Dec 10, 2001
Posts: 7023
|
|
vamseeeeeeeee krishna, Welcome to JavaRanch! We ain't got many rules 'round these parts, but we do got one. Please change your display name to comply with The JavaRanch Naming Policy. I'm thinking that a few of the e's in your display name aren't sincere. Thanks Pardner! Hope to see you 'round the Ranch!
|
[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
|
 |
 |
|
|
subject: Operator Overloading
|
|
|