Question: basically my question is:

I need to use getter method in another class, but the same class name and method name makes it difficult.

I have a class Class1 which have a method also named Class1 (unfortunately, this can't be changed)

```html
public class Class1 {

    public ArrayList<Animal> Animals;

    public Class1(int capacity) {
        Animals = new ArrayList<>(capacity);
    }

    public ArrayList<Animal> getTheAnimals(){
        return this.Animals;
    }
```

I need to use the getter method in another class, Class2.

```html
public class Class2{
    /**
     * instantiate a Class1 object
     */

    Class1 c1 = new Class1();
    ArrayList<Animal> Animals = c1.getTheAnimals();
}
```

And I run into problems because I'm instantiating the method (which requires an int) not the class.

Thanks for the help.

Answer: 
The method `public Class1(int capacity) ...` is the ***constructor*** for the class `Class1`. It is the only constructor available, so you MUST provide the `int` argument it wants. If you want, you can define a second constructor that has no parameters.

```
public Class1() {
    Animals = new ArrayList<>();
}

```

which will instantiate `Animals` with the default capacity.

And by the way, variables should start with a lowercase letter according to convention in Java, so it should be `animals`.
I think your problem could be fixed if you used the full name of class1 i.e .Class1 instead of importing it. That would fix it.

like:
,,,

```
Class1 c1 = new <package name>.Class1();

```

,,,