removing the first value in an array c# or java

Posted by MrCode on Stack Overflow See other posts from Stack Overflow or by MrCode
Published on 2013-10-25T15:43:44Z Indexed on 2013/10/25 15:54 UTC
Read the original article Hit count: 136

Filed under:
|
|

hey there i was working on a program and was thinking is it possible was to remove the value from the first element in an array. Has anyone any ideas on how this could be done ? thanks for all input is much appreciated.

i have only tried removing from the last element wasnt sure on how i would remove the first this is how i done the last element

    try
    {
        if (isEmpty())
        {
            throw new Exception("list is empty");
        }
        size = size -1;
        return values[size];
    }
    catch(Exception e)
    {
        System.out.println(e);
        return -1;
    }

© Stack Overflow or respective owner

Related posts about c#

Related posts about java