Erro de compilação bufferedreader

[code]/*

  • To change this template, choose Tools | Templates

  • and open the template in the editor.
    /
    import java.io.BufferedReader;
    import java.io.InputStreamReader;
    import java.io.IOException;
    /
    *

  • @author zafar
    */
    public class GetInputFromKeyboard {

    /**

    • @param args the command line arguments
      */
      public static void main(String[] args) {
      // TODO code application logic here
      BufferedReader dataIn = new BufferedReader(new inputStreamReader(System.in));
      String name = “”;
      System.out.println(“Please enter your Name:”);
      try {
      name = dataIn.readLine();
      } catch (IOException e) {
      System.out.println(“Error!”);
      }
      System.out.println("Hello " + name + “!”);
      }

    private static class inputStreamReader {

     public inputStreamReader(InputStream in) {
     }
    

    }

}
[/code]

Tentei compilar o código acima no netbeans mas ocorreu o erro abaixo. Não sei o que é.

cannot find symbol symbol : constructor BufferedReader(GetInputFromKeyboard.inputStreamReader) location: class java.io.BufferedReader BufferedReader dataIn = new BufferedReader(new inputStreamReader(System.in));

a sua linha 19 apresenta parâmetro incorreto .-.
ela pede um objeto de uma classe que não é a sua pra rodar o construtor

Depois do new a palavra InputStreamReader deve ser escrita com letras maiúsculas.
BufferedReader dataIn = new BufferedReader(new [color=red]I[/color]nputStreamReader(System.in));

[quote=ViniGodoy]Depois do new a palavra InputStreamReader deve ser escrita com letras maiúsculas.
BufferedReader dataIn = new BufferedReader(new [color=red]I[/color]nputStreamReader(System.in));[/quote]

funcionou.

Procure usar uma IDE para evitar esse tipo de erro.
Ler as mensagens e usar o depurador também ajuda muito.

É mais rápido do que recorrer ao GUJ.