public class Test
{
//Car c = null; // Is this better and is it good to set it to null.
public void A()
{
Car c = new Car();
}
public void B()
{
Car c = new Car();
}
public void C()
{
Car c = new Car();
}
}
1) Can I just declare Object 0 globally at the top and use it in each method instead of creating a new one each time (Is this what I am actually doing?)
2) Is it a good idea to initially set the object to null?
cclass member object.