I am having issues with creating objects of a class on android studio. I have created a few classes called Fan, Light and Device. 

When i try to instantiate Fan and Light in MainActivity.java I get these errors:

* Field 'myFan' is never used
* Cannot resolve symbol 'breakDevice'

The code is shown below . I'd appreciate any solution to this problem.
Thanks

> 
> MainActivity.java
> 
> 
> 

```
public class MainActivity extends Activity 
{

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

    public Light myLight = new Light();

    Fan myFan = new Fan();

    myFan.breakDevice();
    myLight.breakDevice();
}

```

> 
> Fan.java
> 
> 
> 

```
package com.example.codealong3;

import android.util.Log;

public class Fan extends Device{

    public Fan() {
        setDeviceName("FAN");
    }

    @Override
    public void breakDevice() {
        Log.e(getDeviceName(), "BANG ! It's broken");
    }
}

```

> 
> Light.java
> 
> 
> 

```
package com.example.codealong3;

import android.util.Log;

public class Light extends Device {

    public Light() {
        setDeviceName("LIGHT");
    }

    @Override
    public void breakDevice() {
        Log.e(getDeviceName(), "Glass Everywhere! .. I guess that's not bad");
    }
}

```