Question
given the following method header: public int method1 (double num1, boolean isOn) the int ______________ 1: means that the method holds only integers 2: means
given the following method header:
public int method1 (double num1, boolean isOn)
the int ______________
1: means that the method holds only integers
2: means that nothing is returned from the method
3:is the type of value that will be returned by the method
4:is the type of argument being passed to the method
2: Select all statements that are true about getters and setters (accessors and mutators)
1:We always name our setter with the word 'set' followed by the name of the instance variable we want the setter to change.
2:we should avoid getters and setters by making our instance variables private.
3:a setter requires an argument that is the same type as the instance variable it is trying to set
4:getters return a value
5:setters return a value
6:getters require an argument
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started