WITH CORRECT ANSWERS
\.ArrayList - ANSWERS-Dynamic array
ArrayList<String> namelist;
nameList = new ArrayList<String>();
Has instance methods:
Add
Get(index)
Size
\.Varargs (variable argument) - ANSWERS-Allows a method to accept zero or
multiple arguments
returnTypr MethodName (dataType ... variableName)
... must be included
Can only be one in the argument
, Must be the last argument
\.Inheritance - ANSWERS-Using this technique, a very general form of a class is
first defined and complied, and then more specialized versions of the class are
defined by adding instance variables and methods. The new specialized classes
automatically have all the instance variables and methods that the base case has.
Allows code to be reused without copying it into the definition of the derived
classes
public class HourlyEmployee extends Employee{...}
\.Override - ANSWERS-Derived classes can change or "override" inherited
methods from the base class to provide their version of the method
@Override
public double area (double...dimensions) {
}
\.Overloading - ANSWERS-When a method in a derived class has a different
signature from the method in the base class, that is overloading
It still inherits the original method from the base class as well