在Java中返回Point值

use*_*635 1 java return point

如何返回Point函数的值.例:

public Point myFunction(int x, int y) {
    return ???; // Want to return X and Y as a point.
}
Run Code Online (Sandbox Code Playgroud)

我不知道回报应该如何.请帮忙.

Ole*_*ksi 7

你有没有尝试过:

   public Point myFunction(int x, int y) {
        return new Point(x, y);
    }
Run Code Online (Sandbox Code Playgroud)

你想要做什么?