I have one String
String path = /PravinSB/servlet/com.gjgj.rmf.controllers.Hello
from this String I need only word - PravinSB.
How can I do this in JAVA
Try this
String path = /PravinSB/servlet/com.gjgj.rmf.controllers.Hello
String[] split = path.split("/");
String name = split[1]; //name is your result.
String path = /PravinSB/servlet/com.gjgj.rmf.controllers.Hello
String[] split = path.split("/");
String name = split[1]; //name is your result.
check below link
http://ideone.com/4Uzosq
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With