Hello!

I keep getting this error:

Exception in thread “main” java.lang.Error: Unresolved compilation problem:

Type mismatch: cannot convert from double to Problem3.Point

```
at Problem3.main(Problem3.java:18)
```

I’m not sure exactly what it means, and I think I just need another person to take a look at my code. I’m getting kind of lost looking at it myself. Thank you.

Here is my code:

```
import java.util.*;
public class Problem3 {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
System.out.println("Enter x1, y1, x2, y2, x3, y3: ");
Point p1 = new Point(p1.x,p1.y);
Point p2 = new Point(p2.x,p2.y);
Point p3 = new Point(p3.x,p3.y);
p1.x = sc.nextDouble();
p1.y = sc.nextDouble();
p2.x = sc.nextDouble();
p2.y = sc.nextDouble();
p3.x = sc.nextDouble();
p3.y = sc.nextDouble();
//call method
Point area = getTriangleArea(p1, p2, p3);
System.out.println("The area of the triangle is: "+ area);
}
public static double getTriangleArea(Point p1, Point p2, Point p3){
double area = ((p1.x*(p2.y - p3.y)) + (p2.x*(p3.y - p1.y)) + (p3.x*(p1.y - p2.y)))/2;
if(area == 0){
System.out.println("This is not a triangle.");
return area;
}
else{
return area;
}
}
class Point{
double x;
double y;
public Point(double x, double y){
this.x = x;
this.y = y;
}
}
}
```