• Home
  • Public Speaking
  • Travel

Java: Deep Dive

Serialization

Serialization is for storing the objects with their fields.

Binding

Static binding

With static methods:

Dynamic binding

With nonstatic methods:

Thread

Multithreading in Java contains two or more parts that can run concurrently.

Synchronization

Effect of Synchronization:

Introspection

We can inspect object via Reflection API:

<

Time and space complexity & O-notation

Time complexity is the measure which gives insights about the computation duration of a problem.
Space complexity is the measure which gives insights about space/memory consumption of a problem.
O-notation is a metric for time complexity. In the following example, count is N*(N-1)/2: for N=5, count=10. Then we conclude is: complexity of it is O(N^2)

What is the time complexity of binary search?

Sorting algorithms

For sorting, there a number of solutions, such as:
  • Bubble Sort
  • Insertion sort
  • Selection sort
  • Heap sort
  • Quick Sort
  • Merge sort
  • Shell Sort
  • Counting Sort
  • Bucket Sort
  • Radix sort
As an example, the implementation of bubble sorting is as follows: