forked from JavaTX/JavaCompilerCore
22 lines
434 B
Plaintext
22 lines
434 B
Plaintext
|
import java.lang.Integer;
|
||
|
|
||
|
record Rec(Integer a, Integer b) {}
|
||
|
|
||
|
/*public class Rec {
|
||
|
x; y;
|
||
|
Rec(Integer a, Integer b) {
|
||
|
x = a;
|
||
|
y = b;
|
||
|
}
|
||
|
}*/
|
||
|
|
||
|
public class RecordTest {
|
||
|
a = new Rec(10, 20);
|
||
|
b = new Rec(10, 20);
|
||
|
c = new Rec(20, 40);
|
||
|
|
||
|
doesEqual() { return a.equals(b); }
|
||
|
doesNotEqual() { return b.equals(c); }
|
||
|
hashCode() { return a.hashCode(); }
|
||
|
toString() { return a.toString(); }
|
||
|
}
|