Is there a case when an object is declared without a call to the constructor? as in, for example:
ArrayList<Integer> grades;
Or is it always the case that ArrayList<Integer> grades
(as in our example here) would always be followed by a call to a constructor as in,
ArrayList<Integer> grades = new ArrayList<Integer>();
?
If the latter is the case i.e. a declaration of an object is always followed by its initialization with a constructor then why isn't
ArrayList<Integer> grades;
already implies
ArrayList<Integer> grades = new ArrayList<Integer>();
Otherwise when is it the case that an object is declared without an immediate call to the constructor following it?
Is it the case that
ArrayList<Integer> grades;
can be initialized by anything other than
= new ArrayList<Integer>();