title: Java printing a String containing an integer
body: <p>I have a doubt which follows.</p>
  
  <pre><code>public static void main(String[] args) throws IOException{
    int number=1;
    System.out.println("M"+number+1);
  }
  </code></pre>
  
  <p><strong>Output:</strong>  <code>M11</code></p>
  
  <p>But I want to get it printed M2 instead of M11. I couldn't number++ as the variable is involved with a for loop, which gives me different result if I do so and couldn't print it using another print statement, as the output format changes. </p>
  
  <p>Requesting you to help me how to print it properly.</p>