how to use determine if a String is actually a character in Java?
<p>I need to check if a String is actually a character (only consists of 1 character). </p>

<p>This is what I have so far.</p>

<pre><code>Scanner keyboard = new Scanner(System.in);
String str = keyboard.next();
    if (isChar(str = a) == true)
    {
         System.out.print("is a character");
    }
</code></pre>
