A class is a container of variables and methods. A class should contain methods and variables which are related in some way. A method is a specific task or job which gets performed on a class. An example might be a bank class. If you wanted to represent a bank as a class you would have variables and methods which have something to do with banking. So methods might be: depositMoney, withdrawMoney, and a variable might be currentBalance.
Please ignore post, I have no idea what I am talking about.
A Class is a definition of a type of object and a place to store things that are valid across all objects of the Class (static variables). An object of the Class is an instance of of something created from that definition. Member variables (also known as instance variables) are places to store the STATE of the object at any given time. Methods are written in the Class and define the BEHAVIOR of an object. You know - things that it can DO with instructions (code) on how to get it done. Local variables (created inside methods or blocks) are temporary working variables that are disposed of as soon as the block or method is complete.
[This message has been edited by Cindy Glass (edited October 28, 2001).]
"JavaRanch, where the deer and the Certified play" - David O'Meara
Joined: Sep 29, 2000
Abdul Rahim1972, The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at "JavaRanch Naming Policy" . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. We would like this forum to be as Professional as possible. Please choose a new name which meets the requirements. Thanks, Cindy