Convert many examples to java backend

**please review**
@grosu this used to work before, mainly because ```Type``` is subsorted to ```KResult```, and thus no heating should occur for ```Type``` variables.