public class Splits { public static void main(String[] args) { String[] name = "com-Kumar-java".split("-"); // pass your expression String splitName = name[name.length - 1]; System.out.println(splitName); } }
No comments:
Post a Comment