日期:2014-05-20 浏览次数:20834 次
public class ReadFile {
public static void main(String[] args) {
String st;
StringBuffer sb = new StringBuffer();
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
try {
st = br.readLine();
for (int i = 0; i < st.length(); i++) {
char c = st.charAt(i);
if (c == '\\') {
sb.append('/');
} else {
sb.append(c);
}
}
String str = sb.toString();
System.out.println(str);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}}