Chapter 4. Objects and Classes

   


  • Introduction to Object-Oriented Programming

  • Using Predefined Classes

  • Defining Your Own Classes

  • Static Fields and Methods

  • Method Parameters

  • Object Construction

  • Packages

  • Documentation Comments

  • Class Design Hints

In this chapter, we

  • Introduce you to object-oriented programming;

  • Show you how you can create objects that belong to classes in the standard Java library; and

  • Show you how to write your own classes.

If you do not have a background in object-oriented programming, you will want to read this chapter carefully. Thinking about object-oriented programming requires a different way of thinking than for procedural languages. The transition is not always easy, but you do need some familiarity with object concepts to go further with Java.

For experienced C++ programmers, this chapter, like the previous chapter, presents familiar information; however, there are enough differences between the two languages that you should read the later sections of this chapter carefully. You'll find the C++ notes helpful for making the transition.


       
    top



    Core Java 2 Volume I - Fundamentals
    Core Java(TM) 2, Volume I--Fundamentals (7th Edition) (Core Series) (Core Series)
    ISBN: 0131482025
    EAN: 2147483647
    Year: 2003
    Pages: 132

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net