I was trying the following code on my IntelJ
package com.Global2020;
import java.awt.*;
import java.util.Date;
public class Main {
public static void main(String[] args) {
Point point1 = new Point(x: 1, y: 2);
Point point2 = point1;
point1.x = 3;
point1.y = 5;
System.out.println(point2);
}
}
I have got the following error;
java: β)β expected
It drives me crazy because, I can not see my mistake. If you please can help me that will be great.