title: Creating a simple output to logcat
body: <p>I can't figure out the proper way to output an int the logcat and the <a href="http://developer.android.com/reference/android/util/Log.html" rel="nofollow">api document</a> doesn't make sense to me.</p>
  
  <p>I feel like this should do it:</p>
  
  <pre><code>package com.example.conflip;
  
  import java.util.Random;
  
  import android.os.Bundle;
  import android.app.Activity;
  import android.util.Log;
  import android.view.Menu;
  
  public class MainActivity extends Activity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          flip();
      }
  
      public int flip() {
          Random randomNumber = new Random();
          int outcome = randomNumber.nextInt(2);
          Log.d(outcome);
          return outcome;
      }
  
      @Override
      public boolean onCreateOptionsMenu(Menu menu) {
          // Inflate the menu; this adds items to the action bar if it is present.
          getMenuInflater().inflate(R.menu.main, menu);
          return true;
      }
  
  }
  </code></pre>
  
  <p>However I only get the error <code>The method d(String, String) in the type Log is not applicable for the arguments (int)</code></p>
  
  <p>Do I need to cast the int to a string? And if so, how?</p>
  
  <p><strong>Update:</strong></p>
  
  <p>Though all the solutions below do work, LogCat would not display output until I selected my hardware device in DDMS.</p>