Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*String to be split*/
- String str = lastName;
- String[] lastN;
- /*Delimiter*/
- String delimiter = "";
- /*Split by spaces*/
- lastN = str.split(delimiter)
- /*store last substring which be last name*/
- lastN=nameList[-1];
- if (lastName.length() > 3 && idNumber.length() > 2)
- {
- return lastName[0-3] + idNumber[0-2];
- }
- else
- {
- return lastName + idNumber;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement