Skip to content

Following the book Data Structures with Java by John R. Hubbard, Ph.D.

Notifications You must be signed in to change notification settings

evicoach/Data-Structures-with-Java

Repository files navigation

Data-Structures-with-Java

Following the book Data Structures with Java by John R. Hubbard, Ph.D.

An object is a software unit that is produced according to a unique class specification. It is called an instance of its class. The process of creating it is called instantiating the class.

Chapter One

A java class consists of three kinds of members

  1. Fields
  2. Methods
  3. Constructors

The fields hold the data for class objects The methods hold the statements that are executed by the object The constructor holds the code that initializes the object's fields

Specifying what an object can do, without specifying how it does it is an abstraction.

Concealing the implementation of a method from the clients who use the method is called information hiding.

Abstract Data Type

An Abstract Data Type is a specification of only the behaviour of instances of that type.

Classes And Objects

Classes are concrete data types that specify how their state is stored, and how their instances behave.

A class may have six kinds of members

1. Fields that specify the kind of data that the object holds
2. Constructors that specify how the objects are to be created
3. Methods that specify the operations that the object can perform
4. Nested classes
5. Interfaces
6. Enum type definition

The purpose of a declaration is to introduce an identifier to the compiler. It provides all the information the compiler needs in order to compile statements that uses that identifier.

A field is a variable that holds data for the object.

About

Following the book Data Structures with Java by John R. Hubbard, Ph.D.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages