
problem with following code....
class Employee { int empno; String name; String edesig;
Employee() { empno=0;
} Employee(int eno,String ename,String ed) { empno=eno; name=ename; edesig=ed; } public void disp() { System.out.println("The empno is:"+empno); System.out.println("The name is:"+name); System.out.println("The desig is:"+edesig);
} }
class salary extends Employee { double basic;
salary(int eno,String ename,String ed,double bas) { super(eno,ename,ed); basic=bas; }
public void calculate() { double sal,netsal; double da,hra,pf; da=basic*0.10f; hra=basic*0.15f; pf=basic*0.08f; sal=basic+da+hra; netsal=sal-pf; super.disp(); System.out.println("The net salary is:"+netsal);
} } class x { public static void main(String args[]) {
salary s1=new salary(123,"rty","ert",1300.00); s1.calculate(); } }

Your code works fine. There is no error at all. IF there is any query related to it then please mention it.