Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

error in insert function

  • 05-03-2008 2:15pm
    #1
    Closed Accounts Posts: 20


    public static PhoneBookEntry [] insert(PhoneBookEntry p, PhoneBookEntry [] aContacts) {
    int len = aContacts.length;
    PhoneBookEntry [] aContacts2 = new PhoneBookEntry[len+1];

    for (int x=0; x<len; x++) {
    aContacts2[x] = aContacts[x];
    }

    aContacts2[len+1].name = p.name;
    aContacts2[len+1].number = p.number;

    aContacts = aContacts2;
    System.out.println("Name" + aContacts[0].name + " Number " + aContacts[0].number);


    return aContacts2;
    }


Comments

  • Closed Accounts Posts: 3,357 ✭✭✭Beano


    you're going to have to give a little more info.


  • Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭Evil Phil


    How are people supposed to help you when you don't even tell us what's going wrong?

    Try again. State what your trying to achieve, what the problem is and where you think it is occuring. Include any error messages.

    ffs.


This discussion has been closed.
Advertisement