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 and Data Structures in Java

Collection Interface Introduction Collections know also as Data Structures are the fundamentals of each and every programming language. Java provides many of useful data structure for different scenarios and needs. In this blog post I’ll cover only mostly used collections as well as keep things simple, not dive into methods and their details. Because those