Sunday, 31 March 2013

DEFINATION OF SOME JAVA CLASSES

If this is your first encounter with object-oriented programming, a lot of the information in this lesson is going to seem really theoretical and overwhelming. Fear not-the further along in this book you get, and the more Java classes and applications you create, the easier it is to understand.
One of the biggest hurdles of object-oriented programming is not necessarily the concepts; it's their names. OOP has lots of jargon surrounding it. To summarize today's material, here's a glossary of terms and concepts you learned today:

class:
 A template for an object, which contains variables and methods representing behavior and attributes. Classes can inherit variables and methods from other classes.


class method:
A method defined in a class, which operates on the class itself and can be called via the class or any of its instances.
class variable:A variable that is "owned" by the class and all its instances as a whole and is stored in the class.


instance:
 The same thing as an object; each object is an instance of some class.
instance method:
A method defined in a class, which operates on an instance of that class. Instance methods are usually called just methods.
instance variable:
A variable that is owned by an individual instance and whose value is stored in the instance.
interface:
A collection of abstract behavior specifications that individual classes can then implement.
object:
A concrete instance of some class. Multiple objects that are instances of the same class have access to the same methods, but often have different values for their instance variables.
package:
A collection of classes and interfaces. Classes from packages other than java.lang must be explicitly imported or referred to by full package name.
subclass:
A class lower in the inheritance hierarchy than its parent, the superclass. When you create a new class, it's often called subclassing.
superclass:
A class further up in the inheritance hierarchy than its child, the subclass.

No comments:

Post a Comment