×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Nov 2009
    Posts
    80

    int[] m = new int [5* 5]

    Can someone pls explain this: int[] m = new int [5* 5]

    I know m is a one dimensional array, the * inside new int[], what actually is the meaning?

  2. #2
    Registered User
    Join Date
    Dec 2009
    Location
    Bangalore/Mysore, Karnataka, India.
    Posts
    43

    Re: int[] m = new int [5* 5]

    AFAIK, 5* 5 does nothing more than multiplying 5 with 5.
    Hence, 'm' will be an 'int' array whose length will be 25.
    And all the elements will be initialized to 0 (m[0]=0...m[24]=0);

    -Roopesh.

Similar Threads

  1. Picture arrangment on screen
    By Hesam in forum Mobile Java General
    Replies: 1
    Last Post: 2010-03-31, 11:16
  2. Why Are Pre-processors Inherently Evil?
    By grahamhughes in forum Mobile Java General
    Replies: 15
    Last Post: 2009-02-12, 08:42
  3. Python for UIQ
    By cassioli in forum Symbian
    Replies: 141
    Last Post: 2008-06-11, 18:16
  4. CustomItem overlaps TextField
    By asashour in forum Mobile Java General
    Replies: 2
    Last Post: 2007-03-27, 11:35
  5. How to use public EtelGsmPhoneId getPhoneId() ?
    By cassioli in forum Mobile Java General
    Replies: 2
    Last Post: 2007-01-30, 12:49

Posting Permissions

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