Design Patterns Java - Abstract Factory Php

1) At the very beginning?

public class ProductA
{
}

public class ProductB
{
}





We have some simple application, somewhere we need objects A and in other place somewhere we need objects B

and clients

public class Client1
{
    public static void main(String[] args)
    {
        ProductA productA = new ProductA();
    }
}

public class Client2
{
    public static void main(String[] args)
    {
        ProductB productB = new ProductB();
    }
}




2) We are expanding application ...

I turns out that sometimes in application depending on some settings we need to implement in different way this objects of "ProductA" and "ProductB"
Let see this in step 2