title: How to detect primitive data type?
body: <p>How can I check is <a href="http://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html" rel="nofollow">Primitive Data Type</a> of given parameter ?</p>
  
  <pre><code>public static void main(String[] args) {
      if (isPrimitive("test")) {
          System.out.println("True");
      }
      if (isPrimitive(1)) {
          System.out.println("True");
      }
  }
  
  public static boolean isPrimitive(Object o) {
      // Here what would I do ?
  }
  </code></pre>