Object Oriented Software Engineering   View all facts   Glossary   Help
subject > programming language construct > data item > object > Java object > Java instance of wrapper class
Next Java objectuninitialized object    UpJava object    Previous Java objectJava instance of exception class   

Java instance of wrapper class
subjectfact 
Java instance of wrapper classcannot use ordinary arithmetic or logical operatorslink: chapter2section2.8.html#619, 2001-08-30 14:56:15.0
contains an instance variable of the corresponding primitive data typelink: chapter2section2.8.html#610, 2001-08-30 14:56:15.0
is a subtopic of The Basics of Java2001-08-30 14:56:15.0
is a kind of Java object2001-08-30 14:56:15.0
see also Java wrapper class2001-08-30 14:56:15.0
uses methods instead of ordinary arithmetic or logical operatorslink: chapter2section2.8.html#619, 2001-08-30 14:56:15.0
Java objectcan be converted into a string using the toString method2001-08-30 14:56:17.0
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 operator2001-08-30 14:56:17.0
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 serializable2001-08-30 14:56:17.0
has example of creation
 String accountHolder = "Tim";
2001-08-30 14:56:17.0
has example of creation
Account anAccount; 
...
anAccount = new Account(holderName, initialBalance);
2001-08-30 14:56:17.0
objectcan be referred to without reference to the data (instance variables) contained in it2001-08-30 14:56:45.0
can be referred to by several different variables at the same time2001-08-30 14:56:45.0
can represent any entity to which you can associate properties and behaviour2001-08-30 14:56:45.0
has live activation while the object is performing computations in a sequence diagram2001-08-30 14:56:45.0
has behaviour2001-08-30 14:56:45.0
has state2001-08-30 14:56:45.0
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 way2001-08-30 14:56:45.0
is distinct from every other object even if they contain the same data2001-08-30 14:56:45.0
is in a state until an event occurs that causes it to change state2001-08-30 14:56:45.0
is structured2001-08-30 14:56:45.0
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 diagram2001-08-30 14:56:45.0

Next Java objectuninitialized object    UpJava object    Previous Java objectJava instance of exception class