How would I refactor only certain areas of code in Android Studios that are commonly called? For instance:
Dog dog = new Dog();
dog.bark()
Dog dog = new Dog();
dog.bark()
Dog dog = new Dog();
dog.bark()
Dog dog = new Dog();
dog.bark()
I want to be able to change the 2nd copy of the dog object into dog1 and use dog1.bark instead of dog.bark(). I also want to rename the 3rd dog object to dog3 and call dog3.bark instead. Is there any shortcut that allows me to rename only certain portions of code in android studios?