I have the following String 'user/hello' ,'example/first' , 'stackoverflow/login' etc
I want to modify it as follows user/1/hello, example/1/first , stackoverflow/1/login.
I want to replace first '/' with '/1/'
I tried replaceFirst but I am not able to get the expected result.
String temp = "user/hello";
temp.replaceFirst("/","/1/");