Modyfied Java examples so as to comply with coding standards.