Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Person {
- Person spouce;
- String name;
- public Person(String name) {
- this.name = name;
- }
- @Operator(Type.ADDEQUALS)
- Person concat(Person p) {
- return this.spouce = p;
- }
- }
- class Test {
- public static void main(String[] args) {
- Person adam = new Person("Adam");
- Person joe = new Person("Joe");
- adam += joe;
- }
- }
Advertisement