Convert many examples to java backend

**please review**
@grosu is right, there should be an occurs check here that makes ```X = T[X]``` false. If this does not happen, it must be a bug. I will look into it.