Bookmark Topic Watch Topic
  • New Topic

replace String input with parenthesis  RSS feed

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Report post to moderator
hi
i want to replace str with pipe symbol.

String str = "(test)";
str=str.replaceAll(str);
System.out.println("output => "+str);

solution:
output => (|)

but i want solution as

output =>
 
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
  • Report post to moderator
You've already asked this question here. Carry the discussion on in that thread.
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!