public class SpitString { public static void main(String arg[]) { String userName = "Jack.Sparrow"; String nickName = userName.split("\\.")[0]; System.out.println("Your Nick Name \t" + nickName); } }
No comments:
Post a Comment