How do I use an equivalent to C++ reference parameters in Java?

后端 未结 11 1327
借酒劲吻你
借酒劲吻你 2020-12-09 14:33

Suppose I have this in C++:

void test(int &i, int &j)
{
    ++i;
    ++j;
}

The values are altered inside the function and then use

11条回答
提交回复
热议问题