Results 1 to 2 of 2
  1. #1
    Veangat is offline Member
    Join Date
    Mar 2010
    Posts
    1
    Rep Power
    0

    Question How array elements gets default value

    How array elements gets default value, even it is a local varialble.

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,784
    Blog Entries
    7
    Rep Power
    21

    Default

    Quote Originally Posted by Veangat View Post
    How array elements gets default value, even it is a local varialble.
    The 'new' operator did it; it allocates memory for an object (an array is also an object) and sets all its bits to zero.

    kind regards,

    Jos

Similar Threads

  1. Swapping elements of an array help please
    By ikillu in forum New To Java
    Replies: 11
    Last Post: 01-15-2012, 09:49 PM
  2. Printing Array elements
    By new person in forum New To Java
    Replies: 2
    Last Post: 02-23-2009, 09:57 PM
  3. comparing elements in array
    By garyscott101 in forum New To Java
    Replies: 14
    Last Post: 12-10-2008, 04:01 PM
  4. Replies: 8
    Last Post: 08-27-2008, 11:45 PM
  5. Help with array of elements
    By zoe in forum New To Java
    Replies: 1
    Last Post: 07-24-2007, 06:33 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •