我是java的新手.如何编写java相当于以下C代码.
void Swap(int *p, int *q) { int temp; temp = *p; *p = *q; *q = temp; }
java swap
java ×1
swap ×1