Q:

Java - A method that takes an array and changes it, returning nothing (issues)

For a class assignment I have to write a method that called encodeChars that takes an array of characters and shifts each lowercase letter in the array up by one. The method is supposed to modify the array passed in and has no return value. My existing code is as follows:
 public void encodeChars(char[] change){
    for (int x = 0; 0 < change.length; x++){
        switch (change[x]){
        case('a'):
            change[x] = 'b';
            break;
        case('b'):
            change[x] = 'c';
            break;
        case('c'):
            change[x] = 'd';
            break;
        case('d'):
            change[x] = 'e';
            break;
        case('e'):
            change[x] = 'f';
            break;
        case('f'):
            change[x] = 'g';
            break;
        case('g'):
            change[x] = 'h';
            break;
        case('h'):
            change[x] = 'i';
            break;
        case('i'):
            change[x] = 'j';
            break;
        case('j'):
            change[x] = 'k';
            break;
        case('k'):
            change[x] = 'l';
            break;
        case('l'):
            change[x] = 'm';
            break;
        case('m'):
            change[x] = 'n';
            break;
        case('n'):
            change[x] = 'o';
            break;
        case('o'):
            change[x] = 'p';
            break;
        case('p'):
            change[x] = 'q';
            break;
        case('q'):
            change[x] = 'r';
            break;
        case('r'):
            change[x] = 's';
            break;
        case('s'):
            change[x] = 't';
            break;
        case('t'):
            change[x] = 'u';
            break;
        case('u'):
            change[x] = 'v';
            break;
        case('v'):
            change[x] = 'w';
            break;
        case('w'):
            change[x] = 'x';
            break;
        case('x'):
            change[x] = 'y';
            break;
        case('y'):
            change[x] = 'z';
            break;
        case('z'):
            change[x] = 'a';
            break;
        default:
            change[x] = change[x];
            break;
        }
    }
}

While I know that the switch is probably overkill for changing the incoming chars and a loop would be more efficient, my issues comes in when trying to test the code in my main method.
For the life of me I can not figure out, or find anywhere in class notes/ on the internet of how to get this method to take in an array of chars and modify it. 
This goes along with testing the method, to make sure I correctly wrote the code to do as I need it. Also, sorry for the any issues that may have resulted in my inexperience of posting code to stackoverflow.

A:

Java passes object references by value. This means that changes you make to the array in the method will be seen outside the method.
Since you are dealing with character arrays, you can construct a string directly from it using the appropriate constructor: String(char[])
Java characters can be treated as a special integer type if you want to do math on them. If you want to add one to a char array element, you can do the following:
if(change[x] == 'z') change[x] = 'a';
else change[x]++;

You have to check the loop index rather than a constant in your loop: for (int x = 0; 0 < change.length; x++) should read for (int x = 0; x < change.length; x++).

