Created
January 20, 2014 06:57
-
-
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
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
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