English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

2006-11-12 18:56:15 · 2 answers · asked by muthiah k 1 in Computers & Internet Programming & Design

2 answers

Java doesn't allow operator overloading.

2006-11-13 05:19:34 · answer #1 · answered by abryanb 2 · 1 0

Operator overloading is where the functionality of an operator can be redefined. In Java, for example, the "+" operator means addition when used with two numeric primitive operands, but means String concatination when either or both the operands are String objects.

Unlike some other languages, such as C++, Java does not allow programmer-defined operator overloading. For Java programmers, this means that when you see an operator, its definition is in accordance with the language specification and has not been arbitrarily redefined by the programmer that authored the code, i.e. "no surprises".

2006-11-13 13:03:09 · answer #2 · answered by vincentgl 5 · 0 0

fedest.com, questions and answers