Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class NewClass {
- public static void main(String[] args) {
- System.out.println(extratit("puket.psu.ac.th/*aaa.html"));
- }
- static String extratit(String url)
- {
- String f = null;
- String[]t=url.split("/");
- // System.out.print(t[t.length-1]);
- if(t[t.length-1].startsWith("*"))
- {
- f="_"+t[t.length-1].substring(1);
- return f;
- }
- else{
- return t[t.length-1];
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment