-- A class contains FIELDs (i.e. member variables in C++) and METHODs (i.e. functions in C++).
-- A class can only extend (subclass) one parent.
cf. In C++, a class can extend more than one parent, which produces more flexibility and more confusion...
-- A class can implement more than one interface.
cf. In C++, there is no concept of "interface", but the same effect can be achieved by using a pure virture class, though the implementation could be complicated. See the post on Stack Overflow for details (http://stackoverflow.com/questions/318064/how-do-you-declare-an-interface-in-c).
-- Overloading (NOT encouraged!)
method signaturethe == method's name and the parameter types
Overloaded methods are differentiated by the number and the type of the arguments passed into the method.
The compiler does not consider return type when differentiating methods, so you cannot declare two methods with the same signature even if they have a different return type.引自 Chapter 4. Classes and Objects
-- Arbitrary Number of Arguments
Use "varargs" to pass an arbitrary number of values to a method.
To use varargs, you follow the type of the last parameter by an ellipsis (three dots, ...), then a space, and the parameter name. The method can then be invoked with any number of that parameter, including none.引自 Chapter 4. Classes and Objects