For the following code, which statement is not true?
public class Sphere
{
Private double radius;
Public double x;
Private double y;
Private double z;
}
A) The z field is available to code written outside the Sphere class.
B) The radius field is not available to code written outside the Sphere class.
C) The radius, x, y, and z fields are members of the Sphere class.
D) The x field is available to code that is written outside the Sphere class.
Correct Answer:
Verified
Q18: A method that stores a value in
Q19: An access specifier indicates how a class
Q20: Instance methods should be declared static.
Q21: The following statement is an example of
Q22: The scope of a private instance field
Q24: Class objects normally have _ that perform
Q25: After the header, the body of the
Q26: Which symbol indicates that a member is
Q27: A constructor _.
A) always accepts two arguments
B)
Q28: The following statement is an example of
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents