-
Continue reading →: How to Check if a Linked List Contains Loop in Java?The problem of detecting loops in a linked list is an important algorithmic problem in computer science. A linked list is a popular data structure used to store a collection of elements, where each element points to the next one in the list. A loop occurs in a linked list…
-
Continue reading →: How to Swap Two Number Numbers without using Temp variable in Java?Swapping two numbers without using a temporary variable is a fundamental problem in computer programming that tests one’s ability to think logically and creatively. It requires a deep understanding of basic programming concepts and the ability to solve problems through analytical thinking. This skill is especially important in programming contexts…
-
Continue reading →: Write a Java Program to Check if a Number is Prime or Not?What is a Prime Number? Lets define the problem statement before we start to write the code! A prime number is a positive integer that is greater than 1, and has no other divisors other than 1 and itself. In simpler terms, a prime number is a number that is…
-
Continue reading →: How to Write a Java Program to Print a Fibonacci SeriesWhat is the Fibonacci Series? The Fibonacci sequence is a series of numbers in which each number is the sum of the two preceding ones, starting from 0 and 1. The sequence goes 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, and so on. The Fibonacci sequence is…
-
Continue reading →: Difference between TreeSet and TreeMap in Java?TreeSet and TreeMap are both classes in Java that implement the Set and Map interfaces, respectively. They are both sorted collections, which means the elements in the collections are stored in a sorted order. The main difference between the two is that a TreeSet is a set of unique elements,…
-
Continue reading →: Difference between wait() and notify() in JavaTo begin, the wait() and notify() methods belong to the Object class in Java. This is to replaces the need to poll conditions repeatedly until they meet consensus – the problem with this is that it eats a lot of CPU resources. So what do they do? Let’s answer that…
-
Continue reading →: Difference between HashMap and HashTable in Java?Let’s begin with the similarities of HashMap and HashTable: Both store key and value pairs in a hash table Both declare an object which are both declared as a key The key is hashed, and then this hash is indexed within the hash table it is stored HashMap vs HashTable…
-
Continue reading →: Difference between ArrayList and LinkedList in Java?An ArrayList and a LinkedList are both data structures used to store a collection of elements, but they have some key differences in terms of their implementation and performance. ArrayList LinkedList Implemented as a dynamic array Implemented as a doubly-linked list Fast random access to elements by index Fast insertion…
-
Continue reading →: Difference between Runnable and Callable Interface in Java?Runnable Callable Defines a task that can be executed by a thread Similar to Runnable, but it is intended to yield a value. Contains one method run() which holds the logic that will be executed by the thread Contains one method call() which holds the logic that will be executed…
-
Continue reading →: Difference between extends Thread vs Runnable in Java?In Java there are two means to generate new “thread of execution”. We will divide and label these two approach Thread and Runnable. Thread Example? Involves the declaration of class to be subclass of the Thread class The subclass instance can then be invoked Runnable Example? This uses a class…
-
Continue reading →: Difference between String, StringBuffer and StringBuilder in Java?String is one of the most used classes in Java! Both StringBuffer and StringBuilder classes provided methods to manipulate Strings. To understand the difference we will explore and compare these classes in Java and when it is best to use them. String vs StringBuffer vs StringBuilder mutability? String is immutable…
-
Continue reading →: Databases – Single-Object WritesAtomicity in isolation also applies when a single object is being changed. For example consider the problem you stumble upon when writing a 20kb JSON document to a database: If the network connection is interrupted after the first 10kbs has been sent, does the database store that un-parsable fragment 10kb…
-
Continue reading →: Databases – Multi-Object OperationsAs per the previous post on What is the meaning of ACID in Databases?, Atomicity and Isolation describe what a database should do if a client makes several writes within the same transaction… What does Atomicity mean? Atomicity means if an error occurs, half way through a sequence of writes the…
-
Continue reading →: Distributed databases – Is Performance, Scalability and Transactional Guarantees Achievable?Almost every relational databases today and a few none relational databases support transactions… Most follow the protocols that were introduced in 1975! IBM system R the first SQL database Although some implementation details have changed, the general technical patterns here have remained the dame for over 40 years! Systems that…
-
Continue reading →: What is the meaning of ACID in Databases?The safety guarantees provided by transactions are often described by the well known acronym ACID. What does ACID stand for? Anomicity Consistency Isolation Durability Where does it come from? In 1983 both Andreas Reuter and Theo Härder, outlined these properties to create clarification for what a fault tolerance mechanism is for databases.…
-
Continue reading →: Do we take Transactions for granted?Transaction are often something we take for granted as developers, when we decide what applications we want to build. The mechanism of a transaction is important to understand, as we also need to know when it is appropriate to use them! In this blog post I will summarise transactions and…
-
Continue reading →: How to understand Apache KafkaThe awesome open source Apache Kafka, which currently meets the demands of todays technological landscape, enabling event stream processing, real-time data pipelines, and data integration at scale. ⭐️ Kafka GitHub Repo Where did it come from? This was originally created to process the real-time data feeds at LinkedIn all the…
-
Continue reading →: Why is Lombok a game changing library in Java development?Java has the reputation of being a verbose language, therefore it is not uncommon to end up with may lines of code, especially for those getter and setters. Lombok to the rescue? Lombok is a Java library that directly tackles this issue of code verbosity and repetition, there are many…
-
Continue reading →: Spring Boot FiltersWhat are Spring Boot filters? Spring boot uses filters to distill HTTP requests, the process here is: Intercepts the request I.e The client side invoking https requests and responses What can filters be used for? A filter is able to perform two operations, this is done on the response and…
-
Continue reading →: Spring Boot – Code Layout & StructureSpring Boot and it layout and code structure is something that is not predefined, it is up to the developer to follow the best practices to find the best practices available to them. You may ask what are these best practices? What typically occurs is that the project gets divided…







