Forum     

Go Back   Digit Technology Discussion Forum > Software > Software Q&A
Register FAQ Calendar Mark Forums Read

Software Q&A Having trouble with software? Find solutions here

Closed Thread
 
LinkBack Thread Tools Display Modes
Old 14-09-2006, 10:51 PM   #1 (permalink)
The No.1 Stupid
 
~Phenom~'s Avatar
 
Join Date: May 2005
Location: CYBERYARD
Posts: 1,705
Question C,Java queries.

Hi friends ,
Just want to know answers to two questions:
1.How to use command line arguments in C?
2.Does Java support operator overloading???Support your answer.

I know many of u people know the answer, please reply...
__________________
n00b forever...
~Phenom~ is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 14-09-2006, 11:00 PM   #2 (permalink)
Microsoft MVP
 
Vishal Gupta's Avatar
 
Join Date: Jul 2005
Location: AskVG.com
Posts: 5,173
Default Re: C,Java queries.

1.) Following links will help u:

http://www.cs.caltech.edu/courses/cs...line_args.html
http://www.planet-source-code.com/vb...=9874&lngWId=3
http://www.tutorialized.com/tutorial...Arguments/4260

2.) No! Java doesnt support Operator Overloading except the String Concatenation "+".
__________________
http://www.AskVG.com/
Vishal Gupta is offline  
Old 14-09-2006, 11:59 PM   #3 (permalink)
The No.1 Stupid
 
~Phenom~'s Avatar
 
Join Date: May 2005
Location: CYBERYARD
Posts: 1,705
Default Re: C,Java queries.

Thanx for the links vishal , u r always supportive.
But I m still not convinced with the second answer. I have read everywhere that Java does not support operator overloading but then I saw "+" being overloaded. That confuses me . How can a property be there but be just limited to "+" ???
__________________
n00b forever...
~Phenom~ is offline  
Old 15-09-2006, 12:07 AM   #4 (permalink)
Microsoft MVP
 
Vishal Gupta's Avatar
 
Join Date: Jul 2005
Location: AskVG.com
Posts: 5,173
Default Re: C,Java queries.

Read here what Guy Steele said about operator overloading:

http://java.sun.com/features/2003/05/steele_qa.html

Quote:
Overloaded operators are still a subject of controversy. They are almost indispensable for certain
kinds of mathematical work, but people who oppose adding them to the Java language point out, quite
rightly, that the feature was badly abused in C++ for nonmathematical purposes, making code much
harder to read than necessary. Most Java applications are nonmathematical in nature. One could make
a good argument that commercial applications have no need for operator overloading, except that
commercial applications do use (or should use) BigDecimal arithmetic, and it would be really nice
to be able to use + and - and * and / with BigDecimal numbers. Much the same can be said of so-called
"lightweight classes": their greatest value would lie in supporting numerical concepts such as
complex numbers and interval arithmetic.

We have an interesting decision to make that is more a political or business question than a
technical one: should the Java language be extended to support the needs of mathematical
applications? If so, then I would argue strongly for introducing operator overloading and lightweight
classes -- I'm pretty sure such facilities would also get used for other purposes. If not, then
maybe we should just make + and - and * and / work for the BigInteger and BigDecimal classes as a
special case, much the same way that + is already a special case for the String class.
I found it interesting while googling for the reason behind it:

http://onthethought.blogspot.com/200...erloading.html
__________________
http://www.AskVG.com/
Vishal Gupta is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +5.5. The time now is 05:13 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2