Hello
By default, a class is private. So i don't understand that this line Tennis player = new Tennis(); can be exectuted. It would not be able to reach the class Tennis.
Thanks
class Tennis
{
public string name;
}
class Head
{
static void Main(string[] args)
{
Tennis player = new Tennis();
...
}
}

Sachin SinghRank #66 · 26.2K reputationPosted Jun 27, 2021, 3:38 AM EDT
Valerie MeunierRank #1,526 · 1K reputationPosted Jun 27, 2021, 3:55 AM EDT
Sonil KumarRank #3,343 · 430 reputationPosted Jul 30, 2021, 8:38 AM EDT