Guys how do I set a field to equal another field in another class : Guys I have the following: 
**Class 1:**

    public class SellProduct
    {
        private int productCost;
        public SellProduct(int productCost)
        {
         this.productCost = productCost;   
        }
        
        public int getProductCost()
        {
            return productCost;
        }
    }
This class will set how much a product costs.
**Class 2:**

    public class SalesOfTheYear
    {
        private int totalIncome;
        SellProduct sellProduct;
        public SalesOfTheYear()
        {
         totalIncome = 0;
        }
        
            public void cashOut()
            {
             totalIncome = sellProduct.getProductCost() + totalIncome;
            }
            
            public int getSalesOfTheYear()
            {
                return totalIncome;
            }
        }
Now what I want is that class two to take how much the products cost and then set it to the totalIncome field. And of course to keep it's value at the same time and not replace it with a new totalIncome value.
However, every time I run cashout it sends a java.lang.NullPointerException. Does this mean I have to create an object of class sellPoduct?
And if do I would have to supply it with a parameter does that mean that whatever I supply it with a parameter so will it always be the productCost? 