Sample Routines Used in Java