Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public String getLoginName()
- {
- int nameLength = 4;
- int idLength = 3;
- if (name.length() < 4){
- nameLength = name.length();
- }
- if (id.length() < 3){
- idLength = id.length();
- }
- return name.substring(0,nameLength) + id.substring(0,idLength);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement