Valerie Meunier

Valerie Meunier

  • NA
  • 693
  • 84.4k

how can class Head access class Tennis?

Jun 26 2021 3:27 PM

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();
             ...
        }

}       


Answers (3)