Skip to main content

1998 | OriginalPaper | Buchkapitel

Java Objects and Classes

verfasst von : William Buchanan, Bsc, CEng, PhD

Erschienen in: Mastering Java

Verlag: Macmillan Education UK

Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.

search-config
loading …

C++ added object-oriented programming onto C. This allows the language to contain non object-oriented code and object-oriented code. Java differs in that it is completely object-oriented. This chapter discusses the main parts of object-oriented design, that is: Classes. This is a collection of data and methods that operate on the data.Objects. This is a created instance of a class which contains its own class data.Methods. These are used to operate on objects and are equivalent to procedures (in Pascal) and functions (in C).Constructors. These are used to initialise an instance of a class.Method overloading. These are used to define a method which has different parameters passed to it.Garbage collection. This is used to clean-up unused objects.

Metadaten
Titel
Java Objects and Classes
verfasst von
William Buchanan, Bsc, CEng, PhD
Copyright-Jahr
1998
Verlag
Macmillan Education UK
DOI
https://doi.org/10.1007/978-1-349-14772-4_4