Doubt in the java code


please comment the errors