Multiple Choice
Consider the following statements.public class Circle
{
Private double radius; public Circle()
{
Radius = 0.0;
} public Circle(double r)
{
Radius = r;
} public void set(double r)
{
Radius = r;
} public void print()
{
System.out.println(radius + " " + area + " "
+ circumference) ;
} public double area()
{
Return 3.14 * radius * radius;
} public double circumference()
{
Return 2 * 3.14 * radius;
}}Circle myCircle = new Circle() ;
Double r;Which of the following statements are valid in Java? (Assume that console is Scanner object initialized to the standard input device.)
(i)
R = console.nextDouble() ;
MyCircle.area = 3.14 * r * r;
System.out.println(myCircle.area) ;
(ii)
R = console.nextDouble() ;
MyCircle.set(r) ;
System.out.println(myCircle.area() ) ;
A) Only (i)
B) Only (ii)
C) Both (i) and (ii)
D) None of these
Correct Answer:

Verified
Correct Answer:
Verified
Q2: The abstract data type specifies the logical
Q6: Members of a class are usually classified
Q11: Suppose that Book is class with two
Q18: When no object of the class type
Q28: Given the declaration public class MyClass {private
Q31: If the object is created in the
Q41: Which of the following class definitions is
Q43: MysteryClass<br>-first: int<br>-second: double;<br>+MysteryClass()<br>+MysteryClass(int)<br>+MysteryClass(double);<br>+MysteryClass(int, double)<br>+setData(int, double): void<br>+getFirst(): int<br>+getSecond():
Q47: The non-static methods of a class are
Q47: In _ copying, each reference variable refers