Java语言中,需要通过键盘输入一个字符串,下列实现正确的是________。
A.
Scanner sc = new Scanner( ); String str = sc.nextLine( );
B.
Scanner sc = new Scanner(System.in ); String str = sc.readLine( );
C.
BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String str = br.nextLine( );
D.
Scanner sc = new Scanner(System.in ); String str = sc.nextLine( );