Page 2 of 2 FirstFirst 12
Results 21 to 25 of 25
  1. #21
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

  2. #22
    Eric Golf is offline Member
    Join Date
    Dec 2008
    Location
    Edinburgh, Scotland
    Posts
    4
    Rep Power
    0

    Default Re-read Q1

    Hi,

    I think people have misunderstood Q1. Surely the answer is 2 not 4.

    Note the question

    If a = {5, 3, 1}, what is the value in a[1] after m1(a); is run?
    4 is what the method returns, not the value in a[1], which is 2.

    Hope this helps

    Eric

  3. #23
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

  4. #24
    Eric Golf is offline Member
    Join Date
    Dec 2008
    Location
    Edinburgh, Scotland
    Posts
    4
    Rep Power
    0

    Default

    Hi Eranga,

    Yes I did.

    Do you think the answer is not 2 or do you feel you had already given that answer?

    Or maybe you feel you gave the information in post 6 but did not want to spoonfeed the answer, in which case I am sorry, I just felt that the OP or other people reading this could be misled.

    Eric

  5. #25
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    No lol, what you say is the exactly correct answer for that question. But our thread starter mess-up with what he's exactly want. Return value or the value of an element of the array. Did you notice that?

    So we need our thread starters' comments here. Since no any reply there. So I guess, he wants to find the return value and send the wrong question here. :)

Page 2 of 2 FirstFirst 12

Similar Threads

  1. I need help on a practice code for java
    By Sageinquisitor in forum New To Java
    Replies: 12
    Last Post: 07-13-2010, 05:00 PM
  2. [SOLVED] Is this good programming practice?
    By porchrat in forum New To Java
    Replies: 9
    Last Post: 04-08-2009, 01:54 PM
  3. Replies: 22
    Last Post: 04-06-2009, 04:36 AM
  4. Best practice of IF loop with NOT
    By sathishranganathan in forum Advanced Java
    Replies: 13
    Last Post: 05-29-2008, 01:11 PM
  5. SCBCD 5.0 Mock Exam Questions
    By kks_krishna in forum Reviews / Advertising
    Replies: 0
    Last Post: 04-02-2008, 09:26 AM

Posting Permissions

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