CSS font stacks & developer FAQs with Web standards
Site navigation below

One of hundreds of answers available with our premium content service.

Part answer

A: The plus operator for Java strings is a limited exceptional case that is practically the same as operator overloading. Its a fine distinction but using + to append object contents is not a general case in Java, it only applies to String objects. An equivalent append operation may be meaningful and useful for data storage types but does not have a general application and is not implemented in Java.

// Compiler error: "operator + cannot be applied to java.util.Vector"
// Vector vector = new Vector() + new Vector();
      

… full answer hidden

Click for full answers

Premium members click below for full answer
How can you say the + operator is not overloaded in Java!

Home · Web fonts · Font stacks · FAQs · Java · CSS · Javascript · HTML · Site manager