Top "Overloading" questions

The terms overloading and overloaded may refer to: - Constructor and method overloading, a type of polymorphism where different functions with the same name are invoked based on the data types of the parameters passed - Operator overloading, a form of functional or method overloading where the action being overloaded is an operator, such as + or -

Best practices regarding equals: to overload or not to overload?

Consider the following snippet: import java.util.*; public class EqualsOverload { public static void main(String[] args) { class Thing { final int …

java equals overloading overriding
Scala double definition (2 methods have the same type erasure)

I wrote this in scala and it won't compile: class TestDoubleDef{ def foo(p:List[String]) = {} def foo(p:List[…

scala compilation overloading typeclass type-erasure
Passing array to function that takes either params object[] or IEnumerable<T>

I want to pass an array of custom objects to a function like String.Join which has the following signatures: …

c# arrays string overloading enumerable
Function overloading in Dart

The following code: class Tools { static int roll(int min, int max) { // IMPLEMENTATION } static int roll(List<int> …

dart overloading
Overload handling of std::endl?

I want to define a class MyStream so that: MyStream myStream; myStream << 1 << 2 << 3 << …

c++ overloading iostream manipulators endl
Can macros be overloaded by number of arguments?

How does this work? How can a C99/C++11 variadic macro be implemented to expand to different things on the …

c++ c overloading c-preprocessor variadic-macros
gcc Woverloaded-virtual warnings

The following C++ code i think is correct, but produce some warnings when compiled with "-Woverloaded-virtual", is the warning bogus …

c++ gcc virtual-functions overloading
Reference is ambiguous with generics

I'm having quite a tricky case here with generics and method overloading. Check out this example class: public class Test { …

java eclipse generics javac overloading
How is an overloaded method chosen when a parameter is the literal null value?

I came across this question in a quiz, public class MoneyCalc { public void method(Object o) { System.out.println("Object …

java overloading
overloading assignment operator With subscript operator

I overloaded both subscript operator and assignment operator and I am trying to get right value to assignment operator example …

c++ operator-overloading overloading assignment-operator subscript