Android Software Engineer Interview Questions

8,344 android software engineer interview questions shared by candidates

The following function is stripping (removing) all the characters in string stripChars from the end of the string str? The function is incomplete. What code should be there in place of the comment? public static String stripEnd(final String str, final String stripChars) { if (str == null) return str; int end = str.length(); int INDEX_NOT_FOUND = -1; if(end == 0) return str; else if (stripChars.isEmpty()) { return str; } else { // ********************* // What's the code here? // ********************* } return str.substring(0, end); } while (end != 0 && str.indexOf(stripChars.charAt(end - 1)) == INDEX_NOT_FOUND) { end++; } while (end != 0 && str.indexOf(stripChars.charAt(end - 1)) != INDEX_NOT_FOUND) { end--; } while (end != 0 && stripChars.indexOf(str.charAt(end - 1)) != INDEX_NOT_FOUND) { end--; } while (end != 0 && stripChars.indexOf(str.charAt(end - 1)) == INDEX_NOT_FOUND) { end++; }
avatar

Android Developer

Interviewed at Smartprix

3.4
Aug 3, 2016

The following function is stripping (removing) all the characters in string stripChars from the end of the string str? The function is incomplete. What code should be there in place of the comment? public static String stripEnd(final String str, final String stripChars) { if (str == null) return str; int end = str.length(); int INDEX_NOT_FOUND = -1; if(end == 0) return str; else if (stripChars.isEmpty()) { return str; } else { // ********************* // What's the code here? // ********************* } return str.substring(0, end); } while (end != 0 && str.indexOf(stripChars.charAt(end - 1)) == INDEX_NOT_FOUND) { end++; } while (end != 0 && str.indexOf(stripChars.charAt(end - 1)) != INDEX_NOT_FOUND) { end--; } while (end != 0 && stripChars.indexOf(str.charAt(end - 1)) != INDEX_NOT_FOUND) { end--; } while (end != 0 && stripChars.indexOf(str.charAt(end - 1)) == INDEX_NOT_FOUND) { end++; }

2nd skype: - Lets say you have to build an activity (screen) which has a drop-down & once you select an item in the drop-down, it loads an image corresponding to that on the screen below. - How will handle cases where user is very rapidly changing his selection from the drop down
avatar

Software Engineer, Mobile (Android)

Interviewed at LinkedIn

3.8
Mar 17, 2014

2nd skype: - Lets say you have to build an activity (screen) which has a drop-down & once you select an item in the drop-down, it loads an image corresponding to that on the screen below. - How will handle cases where user is very rapidly changing his selection from the drop down

Viewing 31 - 40 interview questions

Glassdoor has 8,344 interview questions and reports from Android software engineer interviews. Prepare for your interview. Get hired. Love your job.