Ernest:
A Class is for an Object, for Example:
you have the Class Person that has three parameters which are first
name, last name and age. In your Class you need a constructor
such as
class Person{
        String firstName;//These three are the local variables
        String lastName; //of the object
        int age;

//Constructor
public Person(String firstName, String lastName, int age){
        this.firstName = firstName;
        this.lastName = lastName;
        this.age = age;
    }

Then for each of the parameters of the Person Object you need
a get and set method, ie
 public String getFirstName(){
      return firstName;
}
public void setFirstName(String newFirstName){
      this.firstName = newFirstName;
}

That is your very basic structure of a Class
Jeffrey


On Nov 28, 5:12 pm, "Ernest Azi" <[EMAIL PROTECTED]> wrote:
> I would like to know if someone can tell me what is a normal structure of a 
> class.
>
> I am not talking about anything SUPER complex, just want to know what would 
> be the layout and step by step procedure for a simple class like Date or some 
> other stuff..
>
> I want to teach it to a friend in a very idiot proof way so he gets java 
> classes.
>
> thank you

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to