Run Code
|
Code Wall
|
Users
|
Misc
|
Feedback
|
About
|
Login
|
Theme
|
Privacy
OBF-7 3
//Title of this code //'main' method must be in a class 'Rextester'. import java.util.*; import java.lang.*; class Rextester { public static void main(String args[]) { String url = "https://portal.xxxx.yyy/portal/intranet/" ; String hostName = url.substring(0,url.indexOf("/portal/intranet/")); String PR_hostname = url.substring(0,url.lastIndexOf("/portal")); System.out.println("hostname ="+ hostName) ; System.out.println("Updated hostname ="+ PR_hostname) ; } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
JLF
상속2
Series_4_8
isPrime
Aaina
My1
[JAVA] Cool thing about iterating a map with iterator.
http://stackoverflow.com/questions/23175927/how-to-clone-object-defined-by-interface
Find Case Combinations of a String
combination sum (variation)
Please log in to post a comment.