Added java code for bmi