public int getStudentNum()
{
return studentNum;
}
?
In the above code, identify if the method is a mutator method or an accessor method. Describe how the two types of methods differ and how they are similar.
What will be an ideal response?
Methods that set or change field values are called mutator methods; methods that retrieve values are called accessor methods. In Java, mutator methods conventionally start with the prefixset, and accessor methods conventionally start with the prefixget. Using these three-letter prefixes with your method names is not required, but it is conventional. The method in the above code is an accessor method because it retrieves studentNum.
You might also like to view...
What is the process for creating an InDesign library?
What will be an ideal response?
?A(n) _____ displays only those records that meet a specific condition or conditions.
A. ?detail report B. ?exception report C. ?summary report D. ?exigency report
Describe the steps that must be taken to create image file?s.
What will be an ideal response?
Two key differences between RIPv1 and RIPv2 are that RIPv1 does not support ____________________ and variable-length subnet masking (VLSM).
Fill in the blank(s) with the appropriate word(s).