Commit d9aae425 authored by jinli gu's avatar jinli gu
Browse files

Update Triangle.java

parent 3639c001
...@@ -4,6 +4,6 @@ public class Triangle extends Shape { ...@@ -4,6 +4,6 @@ public class Triangle extends Shape {
@Override @Override
public double area(double length,double width) { public double area(double length,double width) {
System.out.println ("triangle ~area"); System.out.println ("triangle ~area");
return 1.0/2*length*width; return length*width/2;
} }
} }
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment