Question: I have a static reference variable 

```
static IMail mailer = null;

```

to which I am assigning a value in the constructor of the class SearchManager

```
public SearchManager(ILog logger, String basePath, String indexPath, String nwId, IMail mailer) {
        this.logger = logger;
        this.basePath = basePath;
        this.indexPath = indexPath;
        this.nwId = nwId;
        this.mailer = mailer;
    } 

```

and I am using the mailer in my code. The constructor of this class might be called multiple times. So I have a query that how this static reference variable will behave each time the constructor is called. Will it take only the value which I passes when I called the constructor the first time or will it take different values each time I call the constructor?

Answer: 
> 
> All instances of an object share static data. Thus, all Insatnces(your calls to
>  SearchManager constructor) would share mailer.
> 
> 
> 

i.e, say first call to SearchManager had value "X" for mailer and another call to SearchManager would set value "Y" for mailer, now all the instances would have value Y for mailer.
You can change its value any number of time but all instance will see the same value.