Mapa mental
JAVA Objects & Classes
Conteúdo do mapa
JAVA Objects & Classes
Classes
- blueprint or template to create objects of identical types
- determines what objects you get
- consider 3 things:
- class name
- fields
- variables // primitive or references
- EX: age, salary
- variables // primitive or references
- methods
- defines actions that a class's object can do // declaration part & body
- declaration
- return value, method name, list of arg
- body
- code to perform action
- return type:
- primitive
- object
- void
- method main
- provides entry point to application
- declaration
- defines actions that a class's object can do // declaration part & body
- must have AT LEAST one constuctor
- used to construct an object // looks like a method
- doesn't have a return value (not even void)
- used to construct an object // looks like a method
Object (Instance)
- two features
- attributes OR fields
- actions OR methods
- model to represent a real-life situation
- "new" keyword followed by constructor of the class used to create object
- use reference variables to manipulate later
- need to declare an object reference with the same type as the object
- two features
Informações
- Descrição
- Mapa Mental sobre JAVA Objects & Classes, criado por Danielle Dietz em 24-05-2021.
- Criado por
- Danielle Dietz
- Visualizações
- 0
- Avaliação