Convert many examples to java backend

**please review**
@grosu I added an issue and assigned it to Andrei, and created a TODO in lesson 4. Andrei says he will get to it after he finishes his current project.