title: Java - Output Type (String, int, char, double)
body: <p>Probably a very simple question for you guys but one that has been bugging me for the longest time. In my programming class when we are submitting the output of out code we are supposed to have appropriate formatting, for example:</p>
  
  <p>"Hello World" for a string.</p>
  
  <p>'g' for a character.</p>
  
  <p>12 for int.</p>
  
  <p>But recently I have been getting points off because I should have put quotes and other times when I shouldn't have. Take the following code:</p>
  
  <pre><code>public class MysterySoda {
    public static void main(String[] args) {
        String soda = “coke”;
        String pop = “pepsi”; 
        String coke = “pop”;
        String pepsi = “soda”;
        String say = pop;
  
        carbonated(coke, soda, pop);
        carbonated(pop, pepsi, pepsi);
        carbonated(“pop”, pop, “koolaid”);
        carbonated(say, “say”, pop);
    }
  
  public static void carbonated(String coke, String soda, String pop){        
     System.out.println(“say “ + soda + “ not “ + pop + “ or “ + coke);
  }
  </code></pre>
  
  <p>The first line of output is:</p>
  
  <p>say coke not pepsi or pop</p>
  
  <p>But I thought it was:</p>
  
  <p>"say coke not pepsi or pop"</p>
  
  <p>Can someone please explain why the output is not a string?</p>