Skip to content

Instantly share code, notes, and snippets.

@jadbaz
Created July 18, 2019 08:03
Show Gist options
  • Save jadbaz/b60e9c0fc70e6e962039c801f1502793 to your computer and use it in GitHub Desktop.
Save jadbaz/b60e9c0fc70e6e962039c801f1502793 to your computer and use it in GitHub Desktop.
Javac one-liner for getting current date and time
echo "public class T { public static void main (String[] args) { System.out.println(new java.util.Date()); } }" > T.java; javac T.java; java T
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment