Dependency Injection

This is fully to provide the approach of loosely-coupled. the more objects depend on each other, the harder it gets to implement a new functionality. Service classes will be handling the changes and the end consumer will not be affected by the changes made. Like the end consumer will create/inject the service objects implementations of

Race Condition

Running multiple threads are fine, but the issue arises when multiple access to the same resource e.g. memory component a variable, array, or a database system web service. The key issue is multiple threats to alter the same resource. If there is no alteration in the target resource, then multiple threads are good.  Example situation

Process and Thread

Process A process runs independently and isolated of other processes. It cannot directly access shared data in other processes. The resources of the process, e.g. memory and CPU time, are allocated to it via the operating system. Thread Threads are sometimes called lightweight processes. Both processes and threads provide an execution environment, but creating a

Big O Notation

Big O Notation This notation has been implemented to analyze the worse case of an algorithm. “N” is the number of input elements or amount of tasks and assignments to be done.   O(1) Constant Time This concerns only assignment operations which consume the lowest time take place String name ="Java"; O (n) Linear “N”

Collection Interface

Collection Interface   List Set Map provides ordered and indexed collection which may contain duplicates. provides an unordered collection of unique objects, i.e. Set doesn’t allow duplicates An object that maps keys to values. A map cannot contain duplicate keys 1.1 Vector, ArrayList and LinkedList Comparison Operation Vector ArrayList LinkedList Positional Access