Results 1 to 8 of 8
Like Tree2Likes
  • 2 Post By KevinWorkman

Thread: Re: executing a method in main class

  1. #1
    Join Date
    May 2012
    Posts
    1
    Rep Power
    0

    Default Re: executing a method in main class

    Hey guys Sory for disturbing i need some help about an exampe that i made if you can help me up i need hel with main for this example:
    =============>public class Student {

    private String name = " ";
    private String course = " ";

    public Student (String studentName, String studentCourse)
    {
    name = studentName;
    course = studentCourse;
    }

    public String getName ( )
    {
    return name;
    }

    public void setName (String studentName)
    {
    name = studentName;
    }

    public String getCourse ( )
    {
    return course;
    }

    public void setCourse (String studentCourse)
    {
    course = studentCourse;
    }
    }
    What it was asked me to do is to make e program in java with a class called Student with to methods one that set the name of student and the other the returns it so i made those methods but i need hel in the main can you help plssss is very important for me at the school thnnxxx i'm waitin for you answers :)

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,305
    Rep Power
    25

    Default Re: executing a method in main class

    i need hel in the main
    Please explain what you need help with. I don't see a main() method in your code.
    If you don't understand my response, don't ignore it, ask a question.

  3. #3
    Diargg is offline Senior Member
    Join Date
    Feb 2012
    Posts
    117
    Rep Power
    0

    Default Re: Hellow i need some help plssss if you can help me.Read the Description.

    [Code] [/ Code] tags. Put them around your code so that it's easy to read.

    i need help in the main
    You'll need to be more specific than that - are you encountering an error in your code? You didn't even show us your main method.

    Finally, this isn't a site that does your homework for you. Show us what you've gotten so far, and where you're stuck, and then we can help.

  4. #4
    Diargg is offline Senior Member
    Join Date
    Feb 2012
    Posts
    117
    Rep Power
    0

    Default Re: executing a method in main class

    Double posted. Merge?

  5. #5
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,188
    Rep Power
    19

    Default Re: executing a method in main class

    Quote Originally Posted by Diargg View Post
    Double posted. Merge?
    Merged. TauJVProgramer, don't double post and don't use the browser's back button to edit your posts as that creates multiple submissions.

    Also, go through these:
    Forum Rules
    Guide For New Members
    BB Code List - Java Programming Forum

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  6. #6
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,305
    Rep Power
    25

    Default Re: executing a method in main class

    If you don't understand my response, don't ignore it, ask a question.

  7. #7
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,864
    Rep Power
    8

    Default Re: executing a method in main class

    Also sent out as a private message, I assume spammed to many people. For somebody who is "sory for disturbing", you sure did create quite a lot of extra work for other people.
    Norm and quad64bit like this.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  8. #8
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,864
    Rep Power
    8

    Default Re: executing a method in main class

    This message was again sent as a private message. Please stop doing that. Respond to the advice you received, and we'll go from there.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

Similar Threads

  1. Can a class with the main method in it extend?
    By Army in forum New To Java
    Replies: 2
    Last Post: 04-12-2012, 04:15 PM
  2. Class Communication/ Main Method
    By javaNewblet in forum New To Java
    Replies: 5
    Last Post: 11-14-2011, 07:43 AM
  3. main method not found in class
    By eLancaster in forum New To Java
    Replies: 5
    Last Post: 02-09-2011, 08:48 AM
  4. Running main method class from another main class
    By tlrocketman in forum New To Java
    Replies: 3
    Last Post: 12-06-2010, 08:30 AM
  5. executing a method in main class
    By rangers27 in forum New To Java
    Replies: 3
    Last Post: 07-19-2008, 05:04 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •