krishnaa yadav wrote:the followin code can be written as
dots = new int 
The first line only declares an array reference -- no objects are allocated (instantiated) at this time. Granted, if the variable is a local variable, then some space is allocated for it, but that doesn't make it an object.
With the second line, an object is instantiated. And the variable, declared earlier is referenced to it.