0
What should i do if i want to change to this method
https://code.sololearn.com/cQslRC7uC87y/?ref=app Circle a = new Circle(2); Circle b = new Circle(3);
2 Answers
+ 1
public Circle(int radius)
{
this.Radius = radius;
}
If radius shall be optional, you can add another constructor without arguments or:
public Circle(int radius = 1)
{
this.Radius = radius;
}
0
Kyrene the constructors do not accept an argument and collapse and defining the radius' fails.