I have a class Overview where i try to save a Customer. Now i want to use that Customer in another class. Now i m using Public Static value, but my teacher said it s not good to use static variables. Can you solve this
public class OverView {
public static Customer CurrentCustomer;
CurrentCustomer = new Customer("Tom",23);
}
public class removeCustomer{
Customer removeCustomer = OverView.CurrentCustomer;
}