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.
In Java, objects differ from primitive-type variables because: 1. Objects can store more information via their propertie
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am