Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

B. Introduction to Classes, Objects, Methods and Strings

B. Introduction to Classes, Objects, Methods and Strings

Objectives

In this appendix you’ll learn:

• How to declare a class and use it to create an object.

• How to implement a class’s behaviors as methods.

• How to implement a class’s attributes as instance variables and properties.

• How to call an object’s methods to make them perform their tasks.

• What instance variables of a class and local variables of a method are.

• How to use a constructor to initialize an object’s data.

• The differences between primitive and reference types.

Outline

B.1 Introduction

B.2 Declaring a Class with a Method and Instantiating an Object of a Class

B.3 Declaring a Method with a Parameter

B.4 Instance Variables, set Methods and get Methods

B.5 Primitive Types vs. Reference Types


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint