Sail E0 Webinar
Question
Choose the correct statementpublic class Circle{ private double radius; public Circle(double radius){ radius = radius; }}
Options:
A .  The program has a compilation error because we cannot assign radius to radius.
B .  The program does not compile because Circle does not have a default constructor.
C .  The program will compile, but we cannot create an object of Circle with a specified radius. The object will always have radius 0.
D .  The program has a compilation error because it does not have a main method.
Answer: Option C

Submit Your Solution Below and Earn Points !
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

More Questions on This Topic :


Latest Videos

Latest Test Papers