Updating java code snippet and refactoring for hybrid.md

- Updating Java code snippets and replacing with code snippets from samples.
- Refactoring and removing heading for uniformity with other pages.