User is unable to enter the value of the string variable
<p>User is unable to enter the value of the string variable.</p>

<p>This is the program: </p>

<pre><code>import java.io.*;
public class testing
{
  char a;
  int b;
  double c;
  String d;
  public void method() throws IOException
  {
     BufferedReader p=new BufferedReader(new InputStreamReader(System.in));
     System.out.println("Enter a variable of type 'char'");
     a = (char)p.read();
     System.out.println("Enter a variable of type 'string'");
     d = p.readLine();
     System.out.println("Enter a variable of type 'integer'");
     b = Integer.parseInt(p.readLine());
     System.out.println("Enter a variable of type 'double'");
     c = Double.parseDouble(p.readLine());
     System.out.println("Your values are: string-" +d +", integer-" +b +", double-" +c);
  }
}
</code></pre>

<p>Can someone see a problem?</p>
