Question: Update Primitives.java to include the following: private fields for every type of primitive. Constructor with parameters to initialize every primitive field. Update the print() method
Update Primitives.java to include the following:
- private fields for every type of primitive.
- Constructor with parameters to initialize every primitive field.
- Update the print() method in Primitives.java that will print each primitive value on a new line, with the format "variableName : value"
- Add a main method to Primitives.java that creates an instance of Primitives with name primitives, and calls primitives.print().
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
