Abstract
- Immutable - a new object is created when a new value is assigned
- Custom Datatype
- Make Primitive Datatype to fit into the OOP concept
- Has built-in method to convert current value to other Primitive Datatype or Datatype
Value Comparison
- We can’t use
==
to compare OOP Object, because==
compares the value holding by the variable. However, variables are only holding the memory pointers to the OOP Object - So if we want to compare the value of OOP Object, we need to use the
equals()
method
Resource Demanding
- Comes with cost of allocating Heap Segment for OOP Object & collecting garbage afterward
- Less efficient than Primitive Datatype