Java - I have a abstract base class and I want to set few properties of base class from sub class
===

Java - I have a abstract base class and I want to set few properties of base class from sub class. What is the best way to do it ?  Make the properties protected ?  Create setters in the base class ? 

    public abstract class A {
	protected String tag;
	protected String apiUrl;
        // Setter
        public void setApiUri(String url) {
            this.apiUrl = url;
        }
    }

    public class B extends A {
        tag = "Class B";
        apiUrl = "Class B Prefs";
    }

    public class C extends A {
        tag = "Class C";
        apiUrl = "Class C Prefs";
    }
 
Please let me know what is the best approach / any better way of doing it.