完成代码编写,准备进入下一步
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
class arrayTest
{
public static void main(String argv[])
{
String str = new String();
byte [] buf;
BufferedReader bufRead = new BufferedReader(new InputStreamReader(System.in));
int i = 0;
System.out.println("Please input a string and end it by Enter key:");
try
{
str = bufRead.readLine();//Read string
}
catch(IOException e)
{
e.printStackTrace();
}
buf = str.getBytes();
for(i = 0; i < buf.length; i ++)
{
System.out.println(buf[i]);
}
}
}