title: Replacing Integers with Strings Java
body: <p>I'm doing a basic Java tutorial and below is the question.</p>
  
  <p>Write a method that prints the numbers from 1 to 100. But for multiples of three print ÒFizzÓ instead of the number,and for the multiples of five print ÒBuzzÓ. For numbers which are multiples of both three and five print ÒFizzBuzzÓ."</p>
  
  <p>My code is below</p>
  
  <pre><code>public static void fizzBuzz(){
  
          for(int i = 0; i &lt; 101; i= i +1 ){
              System.out.println(i);
          if (i%15 == 0){
              System.out.println("ÒFizzBuzzÓ");
          }else if (i % 3 == 0){
              System.out.println("ÒBuzzÓ");
          }else if (i % 5 == 0){
              System.out.println("ÒFizzÓ");
          }
  
          }
      }
  </code></pre>
  
  <p>It seemingly runs fine, but on closer inspection of the output, the "Fizz" and "Buzz" lines are printed AFTER the relevant numbers and are not printed as a replacement of the numbers</p>
  
  <p>For example, I get the below</p>
  
  <pre><code>9
  ÒBuzzÓ
  10
  ÒFizzÓ
  11
  12
  ÒBuzzÓ
  13
  14
  15
  ÒFizzBuzzÓ
  16
  </code></pre>
  
  <p>How do I get the relevant numbers to be replaced by the correct string statements instead of what I currently have? I only managed to find tips on converting strings to integers, but not replacement of integers to strings on SO, so I would appreciate any help :)</p>