Skip to content

Instantly share code, notes, and snippets.

@addicted2sounds
Created February 27, 2016 15:59
Show Gist options
  • Save addicted2sounds/28841bca049fc0093b60 to your computer and use it in GitHub Desktop.
Save addicted2sounds/28841bca049fc0093b60 to your computer and use it in GitHub Desktop.
public class Main {
public static void main(String[] args) {
System.out.println("Arguments count: " + args.length);
for (int i = 0; i < args.length; i++) {
String type = args[i].matches("[+-]?(\\d*\\.)?\\d*[eE][+-]?(\\d*\\.)?\\d*") ? "Float" : "String";
System.out.println(args[i] + " <" + type + ">");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment