triangle.java Uses or overrides a deprecated API : Finding area and perimeter of triangle of a triangle using stream in java:
On Compiling the below program shows 
Note: triangle.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Please find what error in this program!

    import java.io.*;
    class triangle
    {
    double s,h,area,perimeter;
    void get()throws IOException
    {
    System.out.println("Enter value of side of an equilateral triangle");
    DataInputStream dis=new DataInputStream(System.in);
    s=Double.parseDouble(dis.readLine());
    System.out.println("Enter height");
    h=Double.parseDouble(dis.readLine());
    }
    void area()
    {
    area=0.5*s*h;
    }
    void perimeter()
    {
    perimeter=3*s;
    }
    void display()
    {
    System.out.println("Area="+area);
    System.out.println("Perimeter="+perimeter);
    }
    public static void main(String args[])throws IOException
    {
    triangle t=new triangle();
    t.get();
    t.area();
    t.perimeter();
    t.display();
    }
    }