Page 1 of 1

In Java, objects differ from primitive-type variables because: 1. Objects can store more information via their propertie

Posted: Mon Jun 06, 2022 12:16 pm
by answerhappygod
In Java, objects differ from primitive-type variables
because:
1. Objects can store more information via their properties
(a.k.a. fields), and that information can be of multiple different
types.
2. Objects can store code for actions that they can "carry
out" within their built-in methods.
3. Objects are reference variables, meaning
pass-by-reference rather than pass-by-value is used when an object
is passed to a methods as input.
4. All of the above.