Flutter Course (21 Blogs) Become a Certified Professional

Android Interview Questions And Answers For Beginners In 2024

Last updated on Nov 02,2023 41.8K Views


In our last post we discussed the most common interview questions a beginner can expect while appearing for an Android developer interview. This Android for beginners tutorial covers the responses to those questions. These questions and their answers have been strictly curated under the supervision and guidance of Android Certification experts, who are also working professionals with years of experience in development, training and recruitment. Having read the last post, you now have an idea of the interviewer’s expectations from you, both technically and behaviorally. So, you can prepare accordingly!

Android Interview Questions and Answers

I) What are the components of Android?

Android Components

ComponentDescription
Activity
  • Activity provides an interface for users to interact with the application and take an action.
  • An application generally has multiple activities.
Intent
  • Using intent you allow the application to request action from the other application components.
  • For instance, VIEW, CALL, PLAY etc.
Service
  • Services are components that do not have a User Interface; they run in the background.
  • They would continue to run, even if you switch to another activity or application.
Broadcast Receiver
  • Content provider is a data store that enables data sharing across different applications.
  • Content providers provide a uniform interface to access the data like Call logs.
Content Provider
  • A Broadcast receiver comes into action only in specific situations.
  • Suppose an Intent for which a particular broadcast receiver has been registered occurs, then the broadcast receiver is triggered into action and the user gets a notification for the same.
  • For example, Battery low notification.

You’ll get a walk-through of the entire process using examples, in Edureka’s Android for beginners training.

II) Some C programming Question for you

1) How can you print “hello world” without using semicolon (;)?

Think about it a little before looking at the solution.

Solution
This question can be solved in more than one way:
a)

 #include<stdio.h>
  void main()
  {
  if(printf("Hello World")) { }
  }

b)

  {
  while(printf("Hello World")){}
  }

c)

 { do{} while(printf("Hello World")){} }

Sometimes, multiple choice programming questions can be asked in Android for beginners interviews. Check this one out for instance:

2) What will be output of following C code?

#include<stdio.h>
int main()
{
int *a1;
char **a2;
float ***a3;
double ****a4;
printf("%d %d %d %d ",sizeof(a1),sizeof(a2),sizeof(a3),sizeof(a4));
return 0;
}
Options 

a) 1 2 4 8

b) 2 4 4 8

c) 2 4 2 4

d) 2 2 2 2

Answer: d.

Size of pointer is same no matter what type it is (2 byte)

Note – This is assuming that we are on a 32 bit machine. On 64 bit it will be 4 bytes.

III) Java Coding Question

1) Can you write a java code to swap two numbers?

Solution

public class Swap {
public static void main(String[ ] args)  {
int x = 5;
int y = 6;
//store 'x' in a temp variable
int temp = x;
x  =  y;
y  =  temp;
System.out.println("x=" + x+ "y=" + y);
}
}

2) Write Java code to swap two numbers without using a third variable i.e. temp in the above case.
Tough..??

Not really; in fact you know it already :)

Solution

public class Swap {
public static void main(String[ ] args)  {
int x = 5;
int y = 6;
//Add both the variables and store them in x  i.e x = 11 (x=5 + y=6).
x = x + y;
//Now subtract y from x and store in y i.e y = 5 (x=11 - y=8) . Hence initial value of x is assigned to y.
y = x - y;
//Now subtract y from x and store in x i.e x = 6 (x=11 - y=5) . Hence initial value of y is assigned to x.
x = x - y;
// Both the values are swapped successfully without using the third variable
System.out.println("x=" + x+ "y=" + y);
}
}

Candidates with advanced knowledge would be expected to answer questions much difficult than these. This post however deals with Android for beginners basics, so we’ll
handle interview questions for an experienced Android developer in later posts! Stay tuned.

Happy Learning!

Got a question for us? Please mention it in the comments section and we will get back to you.

Related Posts:

Get started with Android Training

Top 5 Android Interview Questions for freshers

Android Tutorials for Beginners: Activity component

Android Project : BlackJack Game

The Beginner’s Guide to Android: Android Architecture

Comments
35 Comments
  • Really liked what you had to say in your post, Android for beginners: Interview Questions and Answers for freshers, thanks for the good read!
    — Dane

  • I simply want to say I am just all new to blogs and honestly loved this web blog. Likely I’m likely to bookmark your website . You really have terrific stories. Appreciate it for sharing with us your web-site.

  • Good post. I learn something totally new and challenging on sites I stumbleupon every day. It will always be exciting to read content from other authors and use something from other web sites.

    • I needed to write you one tiny reramk in order to thank you so much the moment again for all the pretty principles you’ve featured on this site. It is so surprisingly generous of people like you to make extensively all that numerous people would have distributed for an electronic book to make some profit for their own end, specifically given that you could have tried it if you decided. The good tips as well acted to be a great way to be certain that most people have similar keenness much like my own to grasp a great deal more on the topic of this problem. I know there are lots of more enjoyable sessions up front for those who look into your website.

    • I would like to express aocerpiatipn to this writer just for bailing me out of such a setting. After surfing around throughout the the web and meeting concepts which were not powerful, I thought my life was done. Existing without the answers to the issues you have sorted out by means of the short article is a serious case, as well as the ones which may have in a negative way damaged my entire career if I had not come across your web page. Your own expertise and kindness in maneuvering every aspect was priceless. I am not sure what I would have done if I hadn’t discovered such a thing like this. It’s possible to at this time look forward to my future. Thanks for your time very much for the specialized and sensible guide. I will not be reluctant to recommend your web blog to anyone who should have care about this matter.

    • I would like to express appeacirtion to this writer just for bailing me out of such a setting. After surfing around throughout the the web and meeting concepts which were not powerful, I thought my life was done. Existing without the answers to the issues you have sorted out by means of the short article is a serious case, as well as the ones which may have in a negative way damaged my entire career if I had not come across your web page. Your own expertise and kindness in maneuvering every aspect was priceless. I am not sure what I would have done if I hadn’t discovered such a thing like this. It’s possible to at this time look forward to my future. Thanks for your time very much for the specialized and sensible guide. I will not be reluctant to recommend your web blog to anyone who should have care about this matter.

  • Wow, marvelous blog layout! How long have you been blogging for? you make blogging look easy. The overall look of your website is wonderful, as well as the content!

Join the discussion

Browse Categories

webinar REGISTER FOR FREE WEBINAR
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP

Subscribe to our Newsletter, and get personalized recommendations.

image not found!
image not found!

Android Interview Questions And Answers For Beginners In 2024

edureka.co