{
private double radius; public double x; private double y; private double z;
}
a.x is available to code that is written outside the Sphere class. b.radius is not available to code written outside the Sphere class. c.radius, x, y, and z are called members of the Sphere class. d.z is available to code that is written outside the Sphere class.
ANS: D
8. Which of the following is not part of the method header?
a.Method name
b.Return type
c.Access specifier
d.Parameter variable declaration
e.All of the above are parts of the method header
ANS: E
7. 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.x is available to code that is written outside the Sphere class. b.radius is not available to code written outside the Sphere class. c.radius, x, y, and z are called members of the Sphere class. d.z is available to code that is written outside the Sphere class.
ANS: D
8. Which of the following is not part of the method header?
a.Method name
b.Return type
c.Access specifier
d.Parameter variable declaration
e.All of the above are parts of the method header
ANS: E
7. 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.x is available to code that is written outside the Sphere class. b.radius is not available to code written outside the Sphere class. c.radius, x, y, and z are called members of the Sphere class. d.z is available to code that is written outside the Sphere class.
ANS: D
8. Which of the following is not part of the method header?
a.Method name
b.Return type
c.Access specifier
d.Parameter variable declaration
e.All of the above are parts of the method header
ANS: E
7. For the following code, which statement is not