![]() |
subject > programming language construct > data item > object > Java object > Java instance of wrapper class |
![]() ![]() | ||||
Java instance of wrapper class | ||||
subject | fact |
Java instance of wrapper class | cannot use ordinary arithmetic or logical operators | ![]() |
contains an instance variable of the corresponding primitive data type | ![]() | |
is a subtopic of The Basics of Java | ![]() | |
is a kind of Java object | ![]() | |
see also Java wrapper class | ![]() | |
uses methods instead of ordinary arithmetic or logical operators | ![]() | |
Java object | can be converted into a string using the toString method | ![]() |
can be created by declaring and initializing it such that it is created whenever execution enters a particular block, or, in the case of an instance variable, when an instance is created or by declaring it and initializing it later using the new operator | ![]() | |
can be serialized if it is an instance of a class that implements the interface java.io.Serializable, and if the data in its instance variables is also serializable | ![]() | |
has example of creation String accountHolder = "Tim"; | ![]() | |
has example of creation Account anAccount; | ![]() | |
object | can be referred to without reference to the data (instance variables) contained in it | ![]() |
can be referred to by several different variables at the same time | ![]() | |
can represent any entity to which you can associate properties and behaviour | ![]() | |
has live activation while the object is performing computations in a sequence diagram | ![]() | |
has behaviour | ![]() | |
has state | ![]() | |
has synonym instance: instance is used when you are talking about the role with respect to the class and object is used when talking in a more general way | ![]() | |
is distinct from every other object even if they contain the same data | ![]() | |
is in a state until an event occurs that causes it to change state | ![]() | |
is structured | ![]() | |
is drawn as a rectangle containing a colon and the underlined name of the class (optional if it is clear from the context), which may be preceded by an optional instance name in a UML instance diagram | ![]() |
Next Java object: uninitialized object Up: Java object Previous Java object: Java instance of exception class