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
[user] | |
name = [YOUR_NAME] | |
email = [YOUR_EMAIL] | |
[web] | |
browser = firefox | |
[help] | |
format = web | |
[color] | |
ui = auto | |
[color "branch"] |
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 void printProperties() { | |
RuntimeMXBean runtimeMxBean = ManagementFactory.getRuntimeMXBean(); | |
List<String> arguments = runtimeMxBean.getInputArguments(); | |
System.out.println(Arrays.toString(arguments.toArray())); | |
} |
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 Singleton { | |
private static final Singleton INSTANCE = new Singleton(); | |
private Singleton() { | |
if (INSTANCE != null) { | |
throw new IllegalStateException("Already instantiated"); | |
} | |
} |
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 enum EnumSingleton { | |
INSTANCE; | |
private final String[] favoriteSongs = { "Hound Dog", "Heartbreak Hotel" }; | |
public void printFavorites() { | |
System.out.println(Arrays.toString(favoriteSongs)); | |
} | |
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
[user] | |
name = [YOUR_NAME] | |
email = [YOUR_EMAIL] | |
[web] | |
browser = google-chrome | |
[color] | |
ui = auto | |
[color "branch"] | |
current = yellow bold | |
local = green bold |