Java features explained with examples

Posts in category Uncategorised

AWS Key Management Service

One of the main concerns when developing an application is where/how to store the application secrets such as database passwords, tokens, etc. This post explores the use of AWS Key Management Service to manage the secrets in a Spring Boot application. The steps followed to configure AWS KMS are described in the next sections.   […]

Running Docker on AWS

Recently, while developing a new microservice, I decided to create a “mockserver” to mock a third party system. In order to do that, I created a Docker container encapsulating the server and the stubs to be served in response to the application requests. After running the microservice locally making use of the mockserver, the time […]

Asynchronous REST endpoints

When developing a REST API, a major concern is how to scale the application to cope with large amounts of requests in an efficient way. This excellent article explains the different models to deal with the requests: thread per connection, thread per request and the support for async Servlets introduced in Servlet 3.0. The basic ideas are: threads […]

Inside a class file

In this post, we will explore the inner parts of a class file going byte by byte!!   The class file format is defined at It says: Each class file contains the definition of a single class or interface. I will add that the class may be public or package-private. For instance, it is possible to […]

Overloading by return type

It is known that one of the limitations of Java is the inability to overload a method by return type as the return type is not part of the signature of the method. According to, “Two methods or constructors, M and N, have the same signature if they have the same name, the same […]

Generics erasure

The use of Generics allows a type or method to operate on objects of different types while providing compile-time type safety. However, the JVM knows nothing about type parameters or generics as the compiler erases type parameters when creating bytecode. According to, type erasure aim is “Type erasure ensures that no new classes are created […]