Android developer Interview Questions | Glassdoor.co.in

Android developer Interview Questions

1,788

android developer interview questions shared by candidates

Top Interview Questions

Sort: RelevancePopular Date

1.What is latest version of android and whats the new features for developer 2 .Difference bw paracables and serializable 3. what is build.gradle 4.how to switch bw fragment to activity 5. methods of adapter 6. what is request body parameter in network call 7. how we can do migration in room db

7 Answers

Pie (Android 9) API level-28 Upcoming Version Q (Android 10) API level-29

2.Ans In Android we cannot just pass objects to activities. To do this the objects must either implement Serializable or Parcelable interface. Serializable- Serializable is a standard Java interface. You can just implement Serializable interface and add override methods. The problem with this approach is that reflection is used and it is a slow process. This method creates a lot of temporary objects and causes quite a bit of garbage collection. However, Serializable interface is easier to implement. Parcelable- Parcelable process is much faster than Serializable. One of the reasons for this is that we are being explicit about the serialization process instead of using reflection to infer it. It also stands to reason that the code has been heavily optimized for this purpose. 1.Parcelable is faster than Serializable interface 2.Parcelable interface takes more time to implement compared to Serializable interface 3.Serializable interface is easier to implement 4.Serializable interface creates a lot of temporary objects and causes quite a bit of garbage collection 5`Parcelable array can be passed via Intent in android

3.Ans. Gradle is a build system (open source) which is used to automate building, testing, deployment etc. “Build.gradle” are scripts where one can automate the tasks.

Since i have a working experience of 1 year and 3 months, i was told to join as a Fresher, because i haven't worked professional working experience in Android Development. And for a fresher, salary is quite less as you can expect. But at the end of the day, you are getting paid while you are at learning stage. Should be enough for a fresher only.

5 Answers

Move zeros to end of given array.

8 Answers

What is the output of the following program? class Poly { static int length; int width; public Poly(int l, int w) { length = l; width = w; } int area() { return 2*length*width; } } class Rect extends Poly { public Rect(int l, int w) { super(l,w); } int area() { return length*width; } } class Solution { public static void main(String args[]) { Poly rect1 = new Poly(5,5); Poly rect2 = new Rect(6,4); int area1 = rect1.area(); int area2 = rect2.area(); System.out.println(area1 + " " + area2); } } 30 24 60 48 60 24 25 24 50 48 48 24 50 24

3 Answers

Remove duplicate from contact list.

3 Answers

Which of the following program is a correct implementation of fizzbuzz program? FizzBuzz is a program that prints the integers from 0 to 99. But for multiples of three print “Fizz” instead of the number, and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”. for(i = 0; i < 100; i++) { if(i % 3 == 0) printf("Fizz\n"); if(i % 5 == 0) printf("Buzz\n"); if(i % 15 == 0) printf("FizzBuzz\n"); else printf("%d\n", i); } for(i = 0; i < 100; i++) { if(i % 3 == 0) printf("Fizz\n"); else if(i % 5 == 0) printf("Buzz\n"); else if(i % 15 == 0) printf("FizzBuzz\n"); else printf("%d\n", i); } for(i = 0; i < 100; i++) { if(i % 15 == 0) printf("FizzBuzz\n"); else if(i % 5 == 0) printf("Buzz\n"); else if(i % 3 == 0) printf("Fizz\n"); else printf("%d\n", i); } for(i = 0; i < 100; i++) { if(i % 15 == 0) printf("FizzBuzz\n"); if(i % 5 == 0) printf("Buzz\n"); if(i % 3 == 0) printf("Fizz\n") else printf("%d\n", i); }

5 Answers

THE SUN RISE IN EAST Print the above sentence with out duplicating chars ?

2 Answers

Name the different stages of an android activity.

2 Answers

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++; }

2 Answers

1. Android components 2. App lifecycle. 3. Design pattern

2 Answers
110 of 1,788 Interview Questions