Skip to content

Instantly share code, notes, and snippets.

@rayjcwu
Created January 20, 2014 06:57
Show Gist options
  • Save rayjcwu/8516084 to your computer and use it in GitHub Desktop.
Save rayjcwu/8516084 to your computer and use it in GitHub Desktop.
This utitlity class includes MD5 hash generation from either String, byte[] or InputStream sources. Which Java feature is demostrated by these three static methods? 1. Method overloading 2. Method overriding 3. Polymorphism 4. Reflection
class Checksums {
static String md5 (String input) {
return ...
}
static String md5 (byte[] array) {
return ...
}
static String md5 (InputStream is) {
return ...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment