class Emp
{
int name, emp_no, addrs, ph_no, deprtmnt, post, project;
Emp(int a, int b, int c, int d, int e, int f, int g)
{
name=a;
emp_no=b;
addrs=c;
ph_no=d;
deprtmnt=e;
post=f;
project=g;
}
Emp(int a, int b, int c, int d)
{
name=a;
emp_no=b;
addrs=c;
ph_no=d;
}
Emp(int a, int b, int c, int e, int f)
{
name=a;
emp_no=b;
addrs=c;
deprtmnt=e;
post=f;
}
Emp(int a, int b, int c, int e, int f, int g)
{
name=a;
emp_no=b;
deprtmnt=e;
post=f;
project=g;
}
Emp()
{
System.out.println(name+","+emp_no+","+addrs+","+ph_no+","+deprtmnt+","+post+","+project);
}
}
class Emp1
{
public static Void Main(String[]args)
{
Emp obj1= new Emp(11,12,13,14,15,16,17);
Emp obj2= new Emp(22,23,24,25);
Emp obj3= new Emp(31,32,33,34,35);
Emp obj4= new Emp(41,42,43,44,45,46);
Emp obj5= new Emp();
}// showing error
}
this is my basis program on constructor. when i compile it show error 'classname.java:52:missing return statement'. i don't know how to solve this error. i hava just started learning java.