Created
December 10, 2019 08:40
-
-
Save ayushi24041992/a2cbad0e7452302eea64589e54db5870 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Singleton; | |
public class MSWord { | |
String page = "Word Page"; | |
public static void main(String args[]) { | |
MSWord wordObj = new MSWord(); | |
Printer instance = Printer.getInstance(); | |
instance.print(wordObj); | |
} | |
} | |
package Singleton; | |
public class AcrobatReader { | |
String page = "Pdf Page"; | |
public static void main(String args[]) { | |
AcrobatReader pdfObj = new AcrobatReader(); | |
Printer instance = Printer.getInstance(); | |
instance.print(pdfObj); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment