13 lines
207 B
Java
13 lines
207 B
Java
import java.lang.Integer;
|
|
|
|
record Point(Integer x, Integer y) {}
|
|
|
|
public class OverloadPattern {
|
|
m(Point(Integer x, Integer y)) {
|
|
return x + y;
|
|
}
|
|
|
|
m(Integer x) {
|
|
return x;
|
|
}
|
|
} |