Mapa mental
JAVA
Conteúdo do mapa
JAVA
Class
- a blueprint or a template to create objects of identical type.
- class className { [class body] }
- class names capitalize the initial of each word.
- Constructors
- A special method that is used to initialize a newly created object
- constructorName (listOfArguments) { [constructor body] }
Objects
- an element with values that correspond to the properties of a class
- Fields
- actions Fields are variables. They can be primitives or references to objects.
- The initial of each word in the field, except for the first word, is written with a capital letter.
- Methods
- attributes Methods define actions that a class’s objects (or instances) can do.
- returnType methodName (listOfArguments)
- The return type void means that the method returns nothing.
- Declaration
- The declaration part consists of a return value, the method name, and a list of arguments.
- Body
- The body contains code that perform the action.
- Method Main
- A special method called main provides the entry point to an application. An application normally has many classes and only one of the classes needs to have a main method. This method allows the class containing it to be invoked.
- public static void main (String[ ] args)
- Null Keyword
- declaring a local reference variable within a method but not assigning an object to it
- Creating
- There are a number of ways to create an object, but the most common one is by using the new keyword. new is always followed by the constructor of the class to be instantiated.
Informações
- Descrição
- Mapa Mental sobre JAVA, criado por Jeremie Chan em 14-01-2020.
- Criado por
- Jeremie Chan
- Visualizações
- 0
- Avaliação