Posted on Leave a comment

Java Android faq interview algorithms collections

Collections in java. don’t forget

Руководство по версиям и возможностям Java
Руководство по возможностям Java версий 8-16



Continue reading Java Android faq interview algorithms collections

Posted on Leave a comment

Android – How to close the app

Since API 16 you can use the finishAffinity method, which seems to be pretty close to closing all related activities by its name and Javadoc description:


Finish this activity as well as all activities immediately below it in the current task that have the same affinity. This is typically used when an application can be launched on to another task (such as from an ACTION_VIEW of a content type it understands) and the user has used the up navigation to switch out of the current task and into its own task. In this case, if the user has navigated down into any other activities of the second application, all of those should be removed from the original task as part of the task switch.
Note that this finish does not allow you to deliver results to the previous activity, and an exception will be thrown if you are trying to do so.

Since API 21 you can use a very similar command


Finishes all activities in this task and removes it from the recent tasks list.


public void close()
    Intent intent = new Intent(Intent.ACTION_MAIN);
Posted on Leave a comment

Interview tasks

I had 10 Android interviews during the last two years, here’s the questions plus some lessons I’ve learned

Android Interview Questions [] (pdf)


Google job interview (zip) (Adobe questions) (Amazon) (Samsung) (DELL) (google) (Amazon)

tasks from Uber (pdf)

programmers tasks

Android question (