public与private
public class WildLife{
public WildLife()
{
Elephant myElephant=new Elephant();
Mouse myMouse=new Mouse();
Cat myCat=new Cat();
FeedingTime(myElephant);
FeedingTime(myMouse);
FeedingTime(myCat);
}
public void FeedTime(Animal someCreature)
{
if(someCreature.ISHungry)
{
someCreature.Eat();
}
}
static void Main(string[] args)
{
WildLife w=new WildLife();
}
}
请问一下。这个wildLife构造函数的修饰符可不可以改成private呢??。