In both the "main" method and "getvalue" method the variable "one" and "two" are local variables. So the reference change for the variable "two" in the "getvalue" method doesn't reflect the variable "two" in the main method.
There are at least three reasons why the code you posted will not compile:
getvalues is not the same as getValues - Java is case-sensitive
You did not specify a return type for the getValues method
The main() method is static, but getValues() is not - you cannot call a non-static method from a static one
Please make sure that the code example you post is correct. In this case the question was simple to understand, but making simple mistakes like that can confuse people who want to answer your question.