Are you sure you also want three variables? Why not creating a container like an array or a List and then looping over it? Please do not use Object in your code if you have something more specific (ignore if it was just for an example).
There is also a misconception on your end: you are instantiating objects of the same class, but you are creating three distinct, different objects. When you buy three sheep, you have three different animals, not one!
Listand then looping over it? Please do not useObjectin your code if you have something more specific (ignore if it was just for an example).