Java Sample Codes