Skip to main content

2014 | OriginalPaper | Buchkapitel

2. Introduction to Objects

verfasst von : Noel Kalicharan

Erschienen in: Advanced Topics in Java

Verlag: Apress

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

search-config
loading …

Abstract

In this chapter, we will explain the following:
  • What is a class, an object, a field, and a method
  • That an object variable does not hold an object but, rather, a pointer (or reference) to where the object is actually located
  • The distinction between a class variable (also called a static variable) and an instance variable (also called a non-static variable)
  • The distinction between a class method (also called a static method) and an instance method (also called a non-static method)
  • What the access modifiers public, private, and protected mean
  • What is meant by information hiding
  • How to refer to class and instance variables
  • How to initialize class and instance variables
  • What is a constructor and how to write one
  • What is meant by overloading
  • What is meant by data encapsulation
  • How to write accessor and mutator methods
  • How to print an object’s data in various ways
  • Why the tostring() method is special in Java
  • What happens when we assign an object variable to another
  • What it means to compare one object variable with another
  • How to compare the contents of two objects
  • How a function can return more than one value using an object

Sie haben noch keine Lizenz? Dann Informieren Sie sich jetzt über unsere Produkte:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Fußnoten
1
1There is no conflict in using the same name equals to compare Parts and Strings. If equals is invoked via a Part object, then the equals method from the Part class is used. If equals is invoked via a String object, then the equals method from the String class is used.
 
Metadaten
Titel
Introduction to Objects
verfasst von
Noel Kalicharan
Copyright-Jahr
2014
Verlag
Apress
DOI
https://doi.org/10.1007/978-1-4302-6620-4_2