Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

proxy settings

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
1. can any one tell me how to detect proxy settings with help of java programme.
2. why java doesn't support operator overloading
if so the statement System.out.println(string1+"is a string") ;
mean that '+' is used for concat, but it looks to me that '+' was
overloaded
please explain...
 
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
2) Java doesn't let the programmer to overload an operator. This is a decision of the language designers themselves.
However, Java overloads the + operator. (In fact Java also overloads arithmetic operators like -, * as they are used with ints, floats and doubles)
 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
2. why java doesn't support operator overloading if so the statement System.out.println(string1+"is a string"); mean that '+' is used for concat, but it looks to me that '+' was overloaded
Can't help you on issue [1]. Issue [2] is easy...
+ was indeed overloaded for String concatenation by the designers of Java because they felt the benefit outweighed the cost. They felt differently on the subject of operator overloading in general so the language does not support it. The general feeling, from what I understand and have read, is that it is so difficult to do properly (in terms of design), is so easily abused and leads to such obtuse code that they felt it better left out.
A better question is why they left out an exponentiation operator, at least from my point of view .
Steve
sgwbutcher@aol.com
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic