Home arrow Java arrow Page 6 - Introducing Classes and More in Java
JAVA

Introducing Classes and More in Java


This article introduces you to the Java programming language. The second of two parts, it is excerpted from chapter one of Sams Teach Yourself Java 2 in 21 Days, 4th Edition, written by Rogers Cadenhead and Laura Lemay (Sams; ISBN: 0672326280).

Author Info:
By: Sams Publishing
Rating: 3 stars3 stars3 stars3 stars3 stars / 2
May 11, 2006
TABLE OF CONTENTS:
  1. · Introducing Classes and More in Java
  2. · Running the Program
  3. · Organizing Classes and Class Behavior
  4. · Creating a Class Hierarchy
  5. · Inheritance in Action
  6. · Summary
  7. · Questions and Answers

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Introducing Classes and More in Java - Summary
(Page 6 of 7 )

If today was your first exposure to object-oriented programming, it probably seems theoretical and a bit overwhelming.

That's understandable. When your brain has just been stuffed with object-oriented programming concepts and terminology for the first time, you may be worried that there's no room left for the Java lessons of the remaining 20 days.

At this point, you should have a basic understanding of classes, objects, attributes, and behavior. You also should be familiar with instance variables and methods. You'll be using these right away tomorrow.

The other aspects of object-oriented programming, such as inheritance and packages, will be covered in more detail on upcoming days.

To summarize today's material, here's a glossary of terms and concepts that were covered:

    Class—A template for an object that contains variables to describe the object and methods to describe how the object behaves. Classes can inherit variables and methods from other classes.

    Object—An instance of a 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.

    Instance—The same thing as an object. Each object is an instance of some class.

    Method—A group of statements in a class that define how the class's objects will behave. Methods are analogous to functions in other languages but must always be located inside a class.

    Class method—A method that operates on a class itself rather than on specific instances of a class.

    Instance method—A method of an object that operates on that object by manipulating the values of its instance variables. Because instance methods are much more common than class methods, they often are just called methods.

    Class variable—A variable that describes an attribute of a class instead of specific instances of the class.

    Instance variable—A variable that describes an attribute of an instance of a class instead of the class itself.

    Interface—A specification of abstract behavior that individual classes can then implement.

    Package—A collection of classes and interfaces. Classes from packages other than java.lang must be explicitly imported or referred to by their full package and class name.

    Subclass—A class farther down the class hierarchy than another class, its superclass. Creating a new class that inherits from an existing one is often called subclassing. A class can have as many subclasses as necessary.

    Superclass—A class farther up the class hierarchy than another class, its subclass. A class can have only one superclass immediately above it, but that class also can have a superclass, and so on.


blog comments powered by Disqus
JAVA ARTICLES

- Deploying Multiple Java Applets as One
- Deploying Java Applets
- Understanding Deployment Frameworks
- Database Programming in Java Using JDBC
- Extension Interfaces and SAX
- Entities, Handlers and SAX
- Advanced SAX
- Conversions and Java Print Streams
- Formatters and Java Print Streams
- Java Print Streams
- Wildcards, Arrays, and Generics in Java
- Wildcards and Generic Methods in Java
- Finishing the Project: Java Web Development ...
- Generics and Limitations in Java
- Getting Started with Java Web Development in...

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 10 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials