I have a doubt which follows.
public static void main(String[] args) throws IOException{ int number=1; System.out.println(\"M\"+number+1); }
Try this:
System.out.println("M"+(number+1));