Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: trying to write program to display details of employee

  1. #1
    Junior Member
    Join Date
    May 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post 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();
    }
    }


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,162
    Thanks
    65
    Thanked 2,725 Times in 2,675 Posts

    Default 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
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Member
    Join Date
    Apr 2012
    Posts
    160
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Default 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

Similar Threads

  1. Help me write this program.
    By HuKjr in forum What's Wrong With My Code?
    Replies: 4
    Last Post: December 6th, 2011, 11:05 AM
  2. How would I write this program?
    By mjballa in forum Java Theory & Questions
    Replies: 2
    Last Post: November 14th, 2011, 11:49 PM
  3. Program to read & write the Employee Records
    By arvindk.vij in forum Member Introductions
    Replies: 1
    Last Post: February 11th, 2011, 01:19 AM
  4. Program to read & write the Employee Records
    By arvindk.vij in forum Java Theory & Questions
    Replies: 1
    Last Post: February 11th, 2011, 01:19 AM
  5. how can i write this program
    By lavudyagopi27 in forum Java Theory & Questions
    Replies: 2
    Last Post: September 17th, 2010, 08:11 AM