Posted on Leave a comment

Java Android faq interview algorithms collections

Collections in java. don’t forget

https://habrahabr.ru/post/162017/

https://habr.com/post/156361/

https://habrahabr.ru/post/237043/

364d7e41907e453b8e60128cdac459dc

2016-12-04_00-29-25


Complexity pdf

wiki – Computational complexity theory

O notation

pdf, pdf

Введение в анализ сложности алгоритмов (часть 1) (https://habr.com/post/196560/)

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

is lg n


https://auth0.com/blog/best-practices-in-android-development/

Often Ignored Stuff — Android Data Structures (https://medium.com/@ankitsharma6466/often-ignored-stuff-android-data-structures-ec2efff847ea)

Android Interview Questions Cheat Sheet [https://medium.com/@anitaa_1990/android-interview-questions-cheat-sheet-96ea01c88def]

Android Interview Questions Cheat Sheet — Part II [https://android.jlelse.eu/android-interview-questions-cheat-sheet-part-ii-bea0633f0da7]


Tips:

  • 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

Android


Android


Network

REST, SOAP, WSDL


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
[https://habr.com/ru/company/otus/blog/443710/]

pdf

Map is not a collection.

Questions:

  1. differences between ArrayList and LinkedList
    https://habrahabr.ru/post/162017/
    https://habrahabr.ru/post/159557/
    https://habrahabr.ru/post/128269/
    https://habrahabr.ru/post/127864/
  2. HashMap
  3. BinaryTree
    BalancedTree

Interfaces, Classess:

java-collections_api-collection

Multithreading

wait, notify, notifyAll, concurrent

syncronized, volatile

Understanding Multithreading, ThreadPoolExecutor, Callable, Future by Example [https://medium.com/mindorks/understanding-multithreading-threadpoolexecutor-callable-future-by-example-9ff2419facf7]

Android

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

Activity.OnCreate(Bundle)


Sparse collections

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

@AndroidSobes – Все вопросы по Android [ https://itsobes.ru/AndroidSobes/ ]

Android Interviews in 2019 [ https://proandroiddev.com/android-interviews-in-2019-aa518f321ff ]

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.