初学, 有个问题想请教。要将str中的尖括号替换成圆括号,用replace不管用,没有替换。请问怎么能实现呢?
InputStream in = part.getInputStream();
BufferedReader reader = new BufferedReader(new InputStreamReader(in));
String str = reader.readLine();
while (str != null) {
str.replace( " < ", "( ");
str.replace( "> ", ") ");
out.println(str + " <br/> ");
str = reader.readLine();
}
------解决方案--------------------
while (str != null) {
str=str.replace( " < ", "( ");
str=str.replace( "> ", ") ");
out.println(str + " <br/> ");
str = reader.readLine();
}
------解决方案--------------------
点上面的管理,然后给分