Posted on Leave a comment

Java Android faq interview algorithms collections

Collections in java. don’t forget



Complexity pdf

wiki – Computational complexity theory

O notation

pdf, pdf

Введение в анализ сложности алгоритмов (часть 1) (

int a = 1;
while (a < n) {
a = a * 2;

is lg n

Often Ignored Stuff — Android Data Structures (

Android Interview Questions Cheat Sheet []

Android Interview Questions Cheat Sheet — Part II []


  • JPA, Hibernate pdf
  • java opensource on github pdf
  • collections (jdk, guava, apache etc) pdf
  • java stream api pdf dzone
  • studing java pdf
  • links pdf
  • inputstream into string pdf
  • map, substring in string pdf
  • json pdf


  • Handler, Looper, HandlerThread (Demystifying Android Looper, Handler, and HandlerThread [])
  • serializable, parcelable
  • Service, IntentService. What is inside?
  • Fragment, FragmentTransaction, commit. How does the commit method work? Is commit synchronized?
  • SynchronizationInter-process communication:  mutexes, semaphores, events, etc.
  • Collections in java
  • Singleton and double checking
  • Checked and unchecked exceptions, errors in Java: url
  • Memory leaks due to rotation with AsyncTask
  • what is aar, dex
  • dagger
  • RxJava
  • okhttp, retrofit
  • What is UI-thread, how does it work?
  • how to avoid crash of application if a service can occur crash – we can start the service in another process
  • layout: frame, relative, linear – rendering
  • Fragment.commitAllowingStateLoss (
  • Loader
  • Is it possible that onDestroy is invoked without onPause and onStop? Yes, if there is exception in onCreate.
  • if Activity are closed by OS, then onDestroy will not be invoked.
  • Empty constructor of Fragment is needed in state restoring.
  • Communication between fragments and activities
  • types of Intent
  • what will be after onError in RxJava
  • mvc, mvp, mvi, mvvm. Is aac about real mvvm?
  • Which lifecycle methods of activity will be guaranteed invoked if OS destroys the one?




Object methods

public native int hashCode();
public boolean equals(Object obj) {
return (this == obj);
protected native Object clone() throws CloneNotSupportedException;
public String toString() {
return getClass().getName() + "@" + Integer.toHexString(hashCode());
public final native void notify();
public final native void notifyAll();
public final native void wait(long timeout) throws InterruptedException;
protected void finalize() throws Throwable { }

ob1.Equals(ob2) --> ob1.hashcode == ob2.hashcode

Map is not a collection.


  1. differences between ArrayList and LinkedList
  2. HashMap
  3. BinaryTree

Interfaces, Classess:



wait, notify, notifyAll, concurrent

syncronized, volatile

Understanding Multithreading, ThreadPoolExecutor, Callable, Future by Example []


There are 4 main components: activity, service, broadcastreceiver, ContentProvider

BroadcastReceiver can be registered in manifest or in code.

Service lifecycle:

Restart of service:

Service in UI and service in another thread

Activity lifecycle:

if a view has ID then


Sparse collections

HashMap Array class
<Integer, Object> SparseArray
<Integer, Boolean> SparseBooleanArray
<Integer, Integer> SparseIntArray
<Integer, Long> SparseLongArray
<Long, Object> LongSparseArray
Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.