Created
April 17, 2019 10:04
-
-
Save andreikastsiuk/a86b267d26fd020a50d062671564382b to your computer and use it in GitHub Desktop.
Sample how to hide public constuctor for Util class
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 final class UtilClass { | |
private UtilClass() { | |
throw new AssertionError("No com.kastsiuk.UtilClass instances for you!"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment