I have a class named Users, which has a Sensors-like vector as an attribute
protected Sensors sensors[10];
It also has the setDescription method
public void setDescription (int ind, String description)
{
this.sensors[ind].description = description;
}
After instantiating an object called user, I tried to call by the method like this:
user.setDescription (ctr, description);
But it's giving NullPointerException. If anyone can help me, I'm grateful.