Search:

Type: Posts; User: aussiemcgr

Search: Search took 0.07 seconds.

  1. Replies
    17
    Views
    2,456

    [SOLVED] Re: The 'new' Keyword

    What errors?

    You would want to set an object to null, for example, if you wanted to be accessible by the entire class, but only initialized after a certain event or something occurs. You could...
  2. Replies
    17
    Views
    2,456

    [SOLVED] Re: The 'new' Keyword

    nope, it's the same thing, but that's only because Objects are set to null when not initialized. The same is not true for primitives like ints and doubles. For ints, these two are the same:
    ...
  3. Replies
    17
    Views
    2,456

    [SOLVED] Re: The 'new' Keyword

    The variable would be set to null, meaning it has not been initialized. If you attempted to invoke any methods on the variable (such as the toString() method), a Null Pointer Exception will be thrown...
Results 1 to 3 of 3