O GoConqr está de visual novo! Conte para nós o que você achou.

Mapa mental

Java Objects

Cody Miller Inglês

Conteúdo do mapa

Java Objects

  1. Fields

    • Variables applying to an object
      • Ex: Assigning variables like age, salary, position, address, etc. to an object within a class
  2. Classes

    • Blueprints to create objects of the same type and fields.
      • Ex: Creating an employee class with Age and Position field allows creation of Employee objects with Age and Positions as well.
  3. Methods

    • Defines actions which a class's objects can do. Consists of a declaration and a body.
      • Declaration
        • Consists of a return value, method name, and a list of arguments
      • Body
        • Contains the code which performs the action
      • Ex: int add (int a, int b). This method allows us to add 2 integers. Note: when there is more than one argument, use a comma to separate them.
  4. Constructors

    • Used to construct objects. If not defined, the compiler automatically adds one.
      • Ex: public Employee (int ageValue, double salaryValue). This is a constructor which allows creation of an employee object. having the arguments int ageValue and double salaryValue allow the object to be created without adding extra lines of code to initialize the fields.
  5. Creating an Object

    • Once the class is written, you may add objects to it. This is generally done with the 'new' keyword.
      • Ex: new Employee(); this creates a new employee object.
  6. Null Keyword

    • Allows a reference variable to not have a value, such as when not referencing an object.
      • Ex: Book book = null; In this case, the book has a null value.

Informações

Descrição
Mapa Mental sobre Java Objects, criado por Cody Miller em 27-08-2019.
Criado por
Cody Miller
Visualizações
3
Avaliação

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?