if you declare the function in a public class, you can access it anywhere you want. if that function was in Utils.java
,
public class Utils {
public static String MD5(...) { ... };
}
from any other class, you could access it like,
String s = Utils.MD5(...);