In addition to what @yizuhi pointed out, the above won’t work. You can’t pass values as arguments to a method before they are assigned. Things have to be done in order. First you need to get the user input for the 6 values (x1, x2, x3, y1, y2, y3), then you can create your Point instances using the user input values as arguments.
You could create the Point instances first using default values of perhaps 0, and then re-assign the x and y properties using the user input values. For example:
Point p1 = new Point(0, 0); //supply 0's as the values for x and y initially
//then reassign x and y to the user input values
p1.x = sc.nextDouble();
p1.y = sc.nextDouble();
//and so on
Also, you attempted to format your code using 3 single quotation marks '''. Those won’t work. You need to use back ticks also called back quotes. They slant down from left to right. On my keyboard it’s right below the esc key. It looks like this: ` not like this: '