Last active
August 2, 2019 20:35
-
-
Save barrowsys/5e682a80a0610d1a39b7378da97c6770 to your computer and use it in GitHub Desktop.
java helloworld be like
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
public class HelloWorldWriter { | |
public void WriteHelloWorld() { | |
System.out.println("Hello, World!"); | |
} | |
} |
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
public class HelloWorldWriterFactory { | |
public HelloWorldWriter CreateHelloWorldWriter() { | |
return new HelloWorldWriter(); | |
} | |
} |
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
public class Main { | |
public static void main(String[] args) { | |
HelloWorldWriterFactory hwwf = new HelloWorldWriterFactory(); | |
HelloWorldWriter hww = hwwf.CreateHelloWorldWriter(); | |
hww.WriteHelloWorld(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment