trying to write program to display details of employee
class Employee
{
string id;
string name;
string grade;
public void initemployeeDetails(string id;string nam;string gr)
{
id=i;
name=nam;
grade=gr;
}
public void display()
{
system.out.println("id of employee is"+id);
system.out.println("name of employee is"+name);
system.out.println("grade of employee is"+grade);
}
public static void main(String args[])
{
Employee e1=new Employee();
e1.initemployeeDetails("A###","charan","under");
e1.display();
}
}
Re: trying to write program to display details of employee
Do you have any problems or question?
Please Edit your post and wrap your code with[code=java]<YOUR CODE HERE>[/code] to get highlighting
Re: trying to write program to display details of employee
Just from looking at your code, I'd say you just need to change "system.out.println" to "System.out.println"
Notice that Java is case-sensitive