How to use function parameter: call specific getter

后端 未结 0 1530
悲&欢浪女
悲&欢浪女 2020-12-12 13:00

I have a Dog class with a name and a breed. I want to print either the dog\'s name or its breed depending on a method parameter passed to a printDog method. How do I do that

相关标签:
回答
  • 消灭零回复
提交回复
热议问题