Java Programming Language
JVM Arguments
Section titled “JVM Arguments”Acquiring at Runtime
Section titled “Acquiring at Runtime”List<String> args = ManagementFactory.getRuntimeMXBean().getInputArguments();This has been available since release 1.5
Snippets
Section titled “Snippets”printf pad left with 0 zeros
Section titled “printf pad left with 0 zeros”String.format("%04d", flight.getFlightNumber());Printf formatting was introduced in java 1.5
printf right pad with spaces, width of 10
Section titled “printf right pad with spaces, width of 10”String.format("%-10s", "test");// will equal "test "