Spring beans and Java classes are both objects in Java, but they have different characteristics and are used for different purposes. A Spring bean is an object that is managed by the Spring Framework. This means that the Spring Framework is responsible for creating, configuring, and destroying the bean. Spring beans are typically used to … Continue reading What is a spring bean and is it different from Java class?
Inheritance & Java Sealed Classes
In Java, inheritance allows you to inherit the fields, methods, and nested classes of the parent class, and also add new features through polymorphism and method overriding. Declaring a class as final , prevents the class from getting inherited or extended. So at one end of the spectrum we have inheritance, which allows any subclass … Continue reading Inheritance & Java Sealed Classes
How do you find period or times of the day in Java ?
I accidentally stumbled upon this feature in Java and although it might not be super useful, I have encountered a few use cases to identify the time or period of the day, such as morning, afternoon, or night and this feature has helped . Starting Java 16 , the DateTimeFormatter class which is used for … Continue reading How do you find period or times of the day in Java ?
Java microservices with GraalVM
Microservice is a trending and popular architecture to build applications as it allows organizations to be agile and adopt DevOps and continuous testing practices.Spring Boot is a very popular technology choice to build java based microservices, but it consumes a good amount of memory and spring's runtime reflection approach leads to longer startup times as … Continue reading Java microservices with GraalVM
GraalVM : A JVM written in Java for high performant applications !!
The HotSpot JVM which i shared in the previous blog is suited and optimized for traditional on-premise based applications to provide high throughput and stability.New modern applications are being built for cloud as distributed systems developed using microservices, event driven, asynchronous and reactive design which should scale quickly and efficientlyHotSpot JVM and JIT compiler is … Continue reading GraalVM : A JVM written in Java for high performant applications !!
Execution of a Java Program & Role of Just In Time (JIT) Complier
When we write a Java program and issue a javac command , the program is compiled to bytecode.To execute this program, we issue a java command and when we do so, the bytecode generated by javac is interpreted by the Java Virtual Machine (JVM) to produce machine code which is ultimately fed to CPU to … Continue reading Execution of a Java Program & Role of Just In Time (JIT) Complier
What is Dependency Injection & why do we need it ?
Dependency injection is a technique used in software engineering to develop loosely coupled systems.It is a technique that allows an object to receive other objects that it depends on by some other program than it explicitly calling the dependent object.Let us understand why this is needed by an example. I have a Notification Interface which … Continue reading What is Dependency Injection & why do we need it ?
Protocol Buffers & A Spring Boot Example
Protocol buffers is a method of serializing data , like XML and JSON.The format is created by google as its language-neutral, platform-neutral, extensible mechanism for serializing structured data to transmit it over the wire or to store itProtocol Buffers, which is sometimes referred as Protobuf is not only a message format but also a set of … Continue reading Protocol Buffers & A Spring Boot Example
Concurrency & Parallelism in Java
Concurrency and Parallelism are often used with respect to multithreaded programs and both have different meanings in this context. Concurrency is about processing more than one task at same time but not necessarily simultaneously, It is applied to reduce the response time of the system by using the single processing unit. In a concurrent application, … Continue reading Concurrency & Parallelism in Java