title: incompatible types error in linked list in java
body: <pre><code>public static Node stringToList(String s) {
      Node&lt;Character&gt; head = new Node&lt;Character&gt;();
      for(int i = 0; i &lt; s.length(); i++) {
      head = new Node&lt;Character&gt;(s.charAt(i), head);
      }
      char c = head.item;      // error line
  }
  
  
  
  I am trying to convert the char value in the nodes to an integer value and I believe I have found a way to do so. Just want to store the item in nodes to variable c for the time being. And then I got the error message. 
  Why am I getting an incompatible types error? And it says "required: character".
  
  // Node class:
  public class Node&lt;Item&gt; {
      public Item item;           //as you can see, it a generic class
      public Node&lt;Item&gt; next;
      Node() { 
          item = null; 
          next = null;      
      } 
      Node(Item i) {
          item = i;
          next = null;
      }
      Node(Item i, Node&lt;Item&gt; p) {
          item = i;
          next = p;
      }
  }
  </code></pre>
  
  <h2>full error message: File: /Users/Michelle/BigInt.java [line: 11] Error: /Users/Michelle/BigInt.java:11: incompatible types found : java.lang.Object required: char</h2>