What is the difference between += and =+? Specifically, in java, but in general also.
Specifically, in java, but in general also.
In Java x += is equivalent to x = x + ( where the + operator may be the arithmetical add operator or the string concatenation operator, depending on the type of x. On the other hand, x =+ is really an ugly way of writing x = + where the + is unary plus operator ... i.e. a no-op for numeric types and a compilation error otherwise.
The question is not answerable in the general case. Some languages support a "+=" operator, and others don't. Similarly, some languages might support a "=+" operator and others won't. And some languages may allow an application to "overload" one or other of the operators. It simply makes no sense to ask what an operator means "in general".