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

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

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

Post 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.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply