Transform this code into Java.
function addValues(x, y){
return x + y;
}
`public int addValues(int x, int y) {
    return x + y;
}`
Complete the following task based on the instruction and optional input provided.### Instruction:
Transform this code into Java.

### Input:
function addValues(x, y){
return x + y;
}

### Output:
`public int addValues(int x, int y) {
    return x + y;
}`