¡GoConqr estrena diseño! Cuéntanos qué te parece.

Mapa mental

Ch. 4 Objects and Classes

Jose Hernandez Inglés

Contenido del mapa

Ch. 4 Objects and Classes

  1. What is a Java Object?

    • OOP can be used to show and solve real-life situations
    • Java objects have attributes and actions called fields and method, respectively
      • Fields and methods are optional
    • Classes are used to create Java objects
  2. Java Classes

    • Class determines the object
    • Consider 3 things when writing a class
      • Class name
      • The fields
      • The methods
  3. Fields

    • variables that can reference to objects
    • Follow camel naming convetion
      • ie. maxAge
  4. Methods

    • define what objects can do
    • Has declaration and body part
      • Declaration part
        • Return value
          • can be a primitive (field)
          • can be object
          • can be void
        • method name
        • list of arguments
      • body part
        • code that performs action
  5. Method "main"

    • Provides entry to application
    • allows class containing to be invoked
  6. Constructors

    • Every class needs at least 1 constructor
      • compiler adds 1 if not specified
    • no return value
  7. Creating Objects

    • use "new"
    • usually create reference variable
  8. null Keyword

    • no return value
    • Test if reference variable is null with "==" operator

Información

Descripción
Mapa Mental sobre Ch. 4 Objects and Classes, creado por Jose Hernandez el 18/05/2020.
Creado por
Jose Hernandez
Visitas
0
Valoración

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?