Creational Design Patterns

public class MainClass {
public static void main(String[] args) {
OS osAndroid = new Android();
osAndroid.spec();
OS osIos = new Ios();
osIos.spec();
OS osWindows = new Windows();
osWindows.spec();
}
}

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store