<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>jvmaware</title>
    <link>https://jvmaware.com/</link>
    <description>Recent content on jvmaware</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <managingEditor>sumit@dsadaily.com (sumit)</managingEditor>
    <webMaster>sumit@dsadaily.com (sumit)</webMaster>
    <lastBuildDate>Fri, 02 May 2025 08:50:42 +0530</lastBuildDate>
    <atom:link href="https://jvmaware.com/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Remote Ollama setup running CodeLlama and Web UI</title>
      <link>https://jvmaware.com/ollama-codellama/</link>
      <pubDate>Fri, 02 May 2025 08:50:42 +0530</pubDate><author>sumit@dsadaily.com (sumit)</author>
      <guid>https://jvmaware.com/ollama-codellama/</guid>
      <description>&lt;p&gt;&#xA;&#xA;&lt;a href=&#34;https://ollama.com/&#34;  target=&#34;_blank&#34; &gt;Ollma&lt;/a&gt; is an powerful &#xA;&#xA;&lt;a href=&#34;https://github.com/ollama/ollama?tab=MIT-1-ov-file#readme&#34;  target=&#34;_blank&#34; &gt;open source&lt;/a&gt; tool for running LLMs locally. It can be used to run various &#xA;&#xA;&lt;a href=&#34;https://www.ollama.com/search&#34;  target=&#34;_blank&#34; &gt;models&lt;/a&gt; and comes handy when you are looking for a local solution to run LLMs.&lt;/p&gt;&#xA;&lt;p&gt;&#xA;&#xA;&lt;a href=&#34;https://openwebui.com/&#34;  target=&#34;_blank&#34; &gt;Open WebUI&lt;/a&gt; is a self hosted solution to front Ollama with a user interface that allows you to interact with the models. It provides a simple and intuitive interface for running LLMs, making it easy to test and experiment with different models.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Asking relevant questions - a template</title>
      <link>https://jvmaware.com/questions/</link>
      <pubDate>Sat, 22 Mar 2025 11:02:00 +0530</pubDate><author>sumit@dsadaily.com (sumit)</author>
      <guid>https://jvmaware.com/questions/</guid>
      <description>&lt;p&gt;Having joined a large retail organization six months ago as a senior engineer, I frequently found myself invited to brainstorming sessions and discussions without much prior context or background. This often involved topics outside my immediate area of expertise.&lt;/p&gt;&#xA;&lt;p&gt;Initially, this posed a challenge in contributing effectively. However, adopting a structured approach of asking relevant, strategic questions helped me to clarify objectives, explore alternative viewpoints, and validate assumptions.&lt;/p&gt;&#xA;&lt;p&gt;Following is a template I use to guide my questioning strategy in an unfamiliar discussions:&lt;/p&gt;</description>
    </item>
    <item>
      <title>SpringBoot application on AWS ECS - #2</title>
      <link>https://jvmaware.com/sb-aws-ecs-ci/</link>
      <pubDate>Wed, 28 Feb 2024 21:18:00 +0530</pubDate><author>sumit@dsadaily.com (sumit)</author>
      <guid>https://jvmaware.com/sb-aws-ecs-ci/</guid>
      <description>&lt;p&gt;This is the second installment of our series on deploying a Spring Boot application on &lt;strong&gt;AWS Elastic Container Service (ECS)&lt;/strong&gt; using the &lt;strong&gt;AWS Cloud Development Kit (CDK)&lt;/strong&gt; and Gitlab CI/CD. In the &#xA;&#xA;&lt;a href=&#34;https://jvmaware.com/sb-aws-ecs&#34; &gt;previous&lt;/a&gt; post, we created an ECS infrastructure using the AWS CLI and AWS CDK capable of hosting our application.&lt;/p&gt;&#xA;&lt;p&gt;In this post, we will automate the deployment step using a GitLab pipeline for continuous deployment.&lt;/p&gt;&#xA;&lt;h2 id=&#34;maven-build&#34;&gt;Maven Build&lt;/h2&gt;&#xA;&lt;p&gt;Assuming all code quality, unit tests, and vulnerability scan jobs are configured as required, the following job will run a Maven build using a &lt;strong&gt;Java 17&lt;/strong&gt; image.&lt;/p&gt;</description>
    </item>
    <item>
      <title>SpringBoot application on AWS ECS - #1</title>
      <link>https://jvmaware.com/sb-aws-ecs/</link>
      <pubDate>Thu, 22 Feb 2024 21:18:00 +0530</pubDate><author>sumit@dsadaily.com (sumit)</author>
      <guid>https://jvmaware.com/sb-aws-ecs/</guid>
      <description>&lt;p&gt;Welcome to the first installment in a series on deploying a SpringBoot application on &lt;strong&gt;AWS Elastic Container Service (ECS)&lt;/strong&gt; using the &lt;strong&gt;AWS Cloud Development Kit (CDK)&lt;/strong&gt; and GitLab CI/CD. In this article, we&amp;rsquo;ll walk through the necessary steps to set up the underlying infrastructure to run our SpringBoot application efficiently.&lt;/p&gt;&#xA;&lt;p&gt;This includes:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Setup Fargate backed ECS cluster.&lt;/li&gt;&#xA;&lt;li&gt;VPC Setup.&lt;/li&gt;&#xA;&lt;li&gt;Task Definition.&lt;/li&gt;&#xA;&lt;li&gt;Setup ECS Service.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;We will be using AWS CDK for Java to automate the platform setup process so that we can re-create exact same setup every single time without having to manually repeat all the required steps.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Exploring Java Class Loaders</title>
      <link>https://jvmaware.com/class-loaders/</link>
      <pubDate>Sat, 09 Sep 2023 23:00:00 +0530</pubDate><author>sumit@dsadaily.com (sumit)</author>
      <guid>https://jvmaware.com/class-loaders/</guid>
      <description>&lt;p&gt;&lt;strong&gt;Class Loaders&lt;/strong&gt; play a pivotal role in dynamically loading Java classes into the JVM (Java Virtual Machine) during application execution. Instead of loading all Java classes into memory at once, class loaders fetch classes only when they are requested by the application, which reduces the startup time.&lt;/p&gt;&#xA;&lt;p&gt;The &lt;code&gt;ClassLoader&lt;/code&gt; fetches binary data from the .class files (from local or remote locations) and loads it into the JVM &#xA;&#xA;&lt;a href=&#34;https://docs.oracle.com/javase/specs/jvms/se20/html/jvms-2.html#jvms-2.5.4&#34;  target=&#34;_blank&#34; &gt;method area&lt;/a&gt;. For a given class, this class loading process occurs just &lt;strong&gt;once&lt;/strong&gt;, during the initial reference of a class within the active Java application. Subsequent references reuse the data stored in the method area unless the class has been UNLOADED.&lt;/p&gt;</description>
    </item>
    <item>
      <title>OpenGrok setup for code analysis</title>
      <link>https://jvmaware.com/open-grok/</link>
      <pubDate>Sat, 02 Sep 2023 23:18:00 +0530</pubDate><author>sumit@dsadaily.com (sumit)</author>
      <guid>https://jvmaware.com/open-grok/</guid>
      <description>&lt;p&gt;When &#xA;&#xA;&lt;a href=&#34;http://blog.grepcode.com/&#34;  target=&#34;_blank&#34; &gt;GrepCode&lt;/a&gt; went out of service a couple of years back, there were not many options available at the time. But things have changed for the better, and various alternatives (both freeware and paid) are available now, like &#xA;&#xA;&lt;a href=&#34;https://krugle.com/&#34;  target=&#34;_blank&#34; &gt;krugle&lt;/a&gt;, &#xA;&#xA;&lt;a href=&#34;https://about.sourcegraph.com/&#34;  target=&#34;_blank&#34; &gt;sourcegraph&lt;/a&gt;, &#xA;&#xA;&lt;a href=&#34;https://github.com/cbess/text-sherlock&#34;  target=&#34;_blank&#34; &gt;TextSherlock&lt;/a&gt;, to name a few. However, most available tools are either too basic or expensive for individual use.&lt;/p&gt;&#xA;&lt;p&gt;&#xA;&#xA;&lt;a href=&#34;https://oracle.github.io/opengrok/&#34;  target=&#34;_blank&#34; &gt;OpenGrok&lt;/a&gt; is one such option. I started using OpenGrok sometime back to browse through JDK code. It provides a similar experience of &amp;ldquo;reading&amp;rdquo; the code in an IDE but does not require the hassle of running the build pipelines to resolve all the dependency issues - to get the linking working. The time saved can be crucial if one quickly wants to understand the context (for any project) amidst some production issue.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Beyond Java-8: new features and other changes</title>
      <link>https://jvmaware.com/beyond-java-8/</link>
      <pubDate>Sat, 26 Aug 2023 20:27:00 +0530</pubDate><author>sumit@dsadaily.com (sumit)</author>
      <guid>https://jvmaware.com/beyond-java-8/</guid>
      <description>&lt;p&gt;The following is a &lt;strong&gt;WIP&lt;/strong&gt; presentation to document changes and feature additions to the Java programming language. The list is intended to cover developer-centered changes and may not cover everything.&lt;/p&gt;&#xA;&lt;p&gt;I’ll try to keep it up to date with the six-month release cadence.&lt;/p&gt;&#xA;&lt;div id=&#34;Container&#34;&#xA;style=&#34;position: relative; padding-bottom: 60%; height: 0; overflow: hidden; max-width: 100%;&#34;&gt;&#xA; &lt;iframe id=&#34;googleSlideIframe&#34;&#xA;  src=&#34;https://docs.google.com/presentation/d/e/2PACX-1vRV-WZ_84FnQ364qcfTdf2vJFKZ6ZCyYrp3IBQBcLmBS5vE89P0DWIWOq46Bv6CbqPgNL6iQTp1vXXG/embed&#34;&#xA;  frameborder=&#34;0&#34; allowfullscreen=&#34;true&#34; webkitallowfullscreen=&#34;true&#34; mozallowfullscreen=&#34;true&#34;&#xA;  style=&#34;position: absolute; top: 0; left: 0; width: 100%; height: 100%;&#34;&gt;&lt;/iframe&gt;&#xA;&lt;/div&gt;</description>
    </item>
    <item>
      <title>Optimizing SpringBoot container images</title>
      <link>https://jvmaware.com/thin-sb-cont-image/</link>
      <pubDate>Wed, 16 Aug 2023 19:00:00 +0530</pubDate><author>sumit@dsadaily.com (sumit)</author>
      <guid>https://jvmaware.com/thin-sb-cont-image/</guid>
      <description>&lt;p&gt;While SpringBoot provides a quick and battle-tested way to create a standalone web application(s), the final packaging may be overwhelming for certain scenarios as everything is bundled in a single artifact.&lt;/p&gt;&#xA;&lt;p&gt;This structure becomes a significant challenge when working with containerized applications. One of the fundamental principles while working with containerized applications is - &lt;strong&gt;always keep the frequently changed parts of the application on the top of the image layer stack.&lt;/strong&gt; It is because any changes in the lower level layers also require rebuilding all the images on top.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Supercharging Spring Boot Development with TestContainers</title>
      <link>https://jvmaware.com/test-containers/</link>
      <pubDate>Sat, 29 Jul 2023 23:10:00 +0530</pubDate><author>sumit@dsadaily.com (sumit)</author>
      <guid>https://jvmaware.com/test-containers/</guid>
      <description>&lt;p&gt;As a developer, I frequently test Spring Boot applications against various dependencies, such as databases, messaging queues, or other services. This process can become complex and cumbersome, especially when dealing with integration tests, as those dependencies have to be externally managed.&lt;/p&gt;&#xA;&lt;p&gt;Enter &#xA;&#xA;&lt;a href=&#34;https://java.testcontainers.org/&#34;  target=&#34;_blank&#34; &gt;TestContainers&lt;/a&gt;, a powerful Java library that allows us to spin up disposable containers for testing.&lt;/p&gt;&#xA;&lt;p&gt;In this blog post, we&amp;rsquo;ll explore the seamless integration of TestContainers with SpringBoot, create custom container examples, and demonstrate how to leverage &lt;code&gt;docker-compose.yaml&lt;/code&gt; for orchestrating multiple containers.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Using github actions for maven builds</title>
      <link>https://jvmaware.com/github-actions-maven/</link>
      <pubDate>Thu, 22 Jun 2023 18:40:00 +0530</pubDate><author>sumit@dsadaily.com (sumit)</author>
      <guid>https://jvmaware.com/github-actions-maven/</guid>
      <description>&lt;p&gt;While GitHub has been the primary choice for an SCM tool for many of us, with the integration of various CI tools and ready-made actions, it is growing as an end-to-end solution for complete DevOps practices.&lt;/p&gt;&#xA;&lt;p&gt;At my workplace, we are now using GitLab for various purposes(migrated from Bitbucket and TeamCity), and it has been a smooth migration so far. But I wanted to explore similar features in GitHub as I was already familiar with the interface and hosting almost all of my side projects there.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Amazon EC2 and Route53 - one click setup</title>
      <link>https://jvmaware.com/ec2-route53/</link>
      <pubDate>Wed, 07 Jun 2023 08:33:42 +0530</pubDate><author>sumit@dsadaily.com (sumit)</author>
      <guid>https://jvmaware.com/ec2-route53/</guid>
      <description>&lt;p&gt;I have been using AWS services at my workplace and on my side projects for several years. While the AWS console provides a quick way to jumpstart, it does not entirely integrate with the typical software development lifecycle.&lt;/p&gt;&#xA;&lt;p&gt;At my workplace, we have been using Terraform to provision the infrastructure, but for a side project or working on a proof of concept, I am usually looking for a quicker solution without much overhead. AWS provides a fully functional command line toolset that is easy to configure and integerates well with AWS APIs.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Using instancio to populate test data</title>
      <link>https://jvmaware.com/instancio/</link>
      <pubDate>Mon, 05 Jun 2023 13:40:42 +0530</pubDate><author>sumit@dsadaily.com (sumit)</author>
      <guid>https://jvmaware.com/instancio/</guid>
      <description>&lt;p&gt;Writing exhaustive, maintainable, and relevant unit tests are essential to the software delivery lifecycle. But it can quickly become a tedious task, especially while working with large message payloads with a significant number of attributes. Moreover, the relevant test data is governed by many factors, like patterns, mandatory or optional attributes, and value ranges, to name a few.&lt;/p&gt;&#xA;&lt;p&gt;One option is to source this data directly from production or a production-like environment, but depending on the application you are working on, using actual production-like data for testing may not be the best option always due to various data governance rules.&lt;/p&gt;</description>
    </item>
    <item>
      <title>SSL Offloading and Let&#39;s Encrypt Certificate Integration</title>
      <link>https://jvmaware.com/ssl-offloading/</link>
      <pubDate>Tue, 30 May 2023 21:12:00 +0530</pubDate><author>sumit@dsadaily.com (sumit)</author>
      <guid>https://jvmaware.com/ssl-offloading/</guid>
      <description>&lt;p&gt;Securing web communications with SSL/TLS certificates is crucial for protecting sensitive data. But depending on the inbound traffic volume, you can delegate the encryption-decryption task to a dedicated web server allowing your application server to focus on serving the business functionality only.&lt;/p&gt;&#xA;&lt;p&gt;&#xA;&#xA;&lt;a href=&#34;https://letsencrypt.org/&#34;  target=&#34;_blank&#34; &gt;Let&amp;rsquo;s Encrypt&lt;/a&gt;, a free and open certificate authority, provides an accessible way to obtain and manage SSL certificates. This blog post will explore leveraging Let’s Encrypt certificates for SSL offloading using the Apache HTTP Server as a reverse proxy on an &lt;strong&gt;Ubuntu 22.10&lt;/strong&gt; machine.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Scaling infrastructure horizontally</title>
      <link>https://jvmaware.com/vertical-horizontal-scaling/</link>
      <pubDate>Tue, 16 May 2023 20:12:00 +0530</pubDate><author>sumit@dsadaily.com (sumit)</author>
      <guid>https://jvmaware.com/vertical-horizontal-scaling/</guid>
      <description>&lt;p&gt;&lt;strong&gt;Vertical&lt;/strong&gt; and &lt;strong&gt;Horizontal&lt;/strong&gt; scaling are two approaches to deal with increased load on the system. While Vertical scaling involves adding more resources such as CPU, RAM, or storage to an existing machine, horizontal scaling involves adding more devices to the overall platform.&lt;/p&gt;&#xA;&lt;p&gt;While both approaches have their advantages, there are situations where vertical scaling is not a suitable option. In the last couple of years, I had this discussion multiple times with my colleagues and clients where they are not in favor of increasing infrastructure footprint and are more inclined towards expanding the overall system capacity by adding more resources like CPU, memory, etc.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Using gitlab CI_JOB_TOKEN for including remote projects</title>
      <link>https://jvmaware.com/gitlab-job-token/</link>
      <pubDate>Sat, 13 May 2023 01:10:00 +0530</pubDate><author>sumit@dsadaily.com (sumit)</author>
      <guid>https://jvmaware.com/gitlab-job-token/</guid>
      <description>&lt;p&gt;At my workplace, we recently migrated all our repositories to GitLab as part of the DevOps rationalizing program. The idea was to adopt uniform tools and practices across the organization, as previously, different teams were using various tools for SCM and build/deployment pipelines.&lt;/p&gt;&#xA;&lt;p&gt;The migration had a couple of challenges due to missing features like &#xA;&#xA;&lt;a href=&#34;https://gitlab.com/groups/gitlab-org/-/epics/4367&#34;  target=&#34;_blank&#34; &gt;group-level merge permissions&lt;/a&gt; and code quality gates (similar to Sonarway). Also, as we had some custom solutions running for many years, finding an alternative for those in the new world was additional overhead.&lt;/p&gt;</description>
    </item>
    <item>
      <title>The curious case of Bloom Filters</title>
      <link>https://jvmaware.com/bloom-filters/</link>
      <pubDate>Thu, 26 Jan 2023 04:58:00 +0530</pubDate><author>sumit@dsadaily.com (sumit)</author>
      <guid>https://jvmaware.com/bloom-filters/</guid>
      <description>&lt;p&gt;A &#xA;&#xA;&lt;a href=&#34;https://en.wikipedia.org/wiki/Bloom_filter&#34;  target=&#34;_blank&#34; &gt;Bloom Filter&lt;/a&gt; is a probabilistic data structure used to check the presence of an element in a large dataset.&lt;/p&gt;&#xA;&lt;p&gt;Unlike traditional collections like a &#xA;&#xA;&lt;a href=&#34;https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/util/HashSet.html&#34;  target=&#34;_blank&#34; &gt;HashSet&lt;/a&gt;, a Bloom Filter is NOT used to store the data itself but is only used to check its &lt;strong&gt;absence&lt;/strong&gt; with surety (or its presence with an accepted tolerance level). This makes it space efficient as the presence or absence can be denoted by a single bit, whereas the records in the data set can be of any size.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Garbage Collectors</title>
      <link>https://jvmaware.com/garbage-collectors/</link>
      <pubDate>Mon, 25 Oct 2021 05:01:53 +0000</pubDate><author>sumit@dsadaily.com (sumit)</author>
      <guid>https://jvmaware.com/garbage-collectors/</guid>
      <description>&lt;p&gt;Garbage Collection is one of the most appreciated features of the Java programming language, making it suitable for all kinds of applications. &lt;strong&gt;The ability to automatically recover the previously allocated memory, which is no longer in use,&lt;/strong&gt; allows the Java programmers to focus on the core business logic - a big selling point compared to other object-oriented languages like &#xA;&#xA;&lt;a href=&#34;https://en.wikipedia.org/wiki/C%2B%2B&#34;  target=&#34;_blank&#34; &gt;C++&lt;/a&gt;, where the programmer must manually manage the memory.&lt;/p&gt;&#xA;&lt;p&gt;In most cases, the GC process can be categorized into the following:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Lambda Expressions and Exception Handling</title>
      <link>https://jvmaware.com/lambda-exception-handling/</link>
      <pubDate>Fri, 01 Oct 2021 00:30:00 +0000</pubDate><author>sumit@dsadaily.com (sumit)</author>
      <guid>https://jvmaware.com/lambda-exception-handling/</guid>
      <description>&lt;p&gt;With the introduction of lambda expressions in Java8, significant support was added for functional-style programming, thus promoting a more concise coding style.&lt;/p&gt;&#xA;&lt;p&gt;But even then, the lambda expressions lag basic exception handling features and at times lead to more verbose code on the contrary.&lt;/p&gt;&#xA;&lt;p&gt;This short article will explore a few options to wrap lambda expressions inside exception handlers for checked and unchecked exceptions.&lt;/p&gt;&#xA;&lt;h2 id=&#34;exception-prone-action&#34;&gt;Exception Prone Action&lt;/h2&gt;&#xA;&lt;p&gt;The first task for us is to define an &lt;strong&gt;exception-prone&lt;/strong&gt; action that can terminate abruptly due to a checked or unchecked exception. As we anyways have to devise a solution for lambda expressions, this action has to be a &lt;code&gt;FunctionalInterface&lt;/code&gt; that we can use to map lambda expressions.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Streams and Iterables</title>
      <link>https://jvmaware.com/streams-and-iterables/</link>
      <pubDate>Wed, 08 Sep 2021 15:27:19 +0000</pubDate><author>sumit@dsadaily.com (sumit)</author>
      <guid>https://jvmaware.com/streams-and-iterables/</guid>
      <description>&lt;p&gt;Quoting &#xA;&#xA;&lt;a href=&#34;https://en.wikipedia.org/wiki/Iterator_pattern&#34;  target=&#34;_blank&#34; &gt;Wikipedia&lt;/a&gt;, the iterator design pattern is used to traverse a container for accessing its elements. But with the introduction of streams in &lt;strong&gt;java8&lt;/strong&gt;, we now can leverage parallel processing utilizing the underlying hardware to its maximum potential.&lt;/p&gt;&#xA;&lt;p&gt;In this post, we&amp;rsquo;ll explore the &lt;strong&gt;StreamSupport&lt;/strong&gt; class and its various methods that help us to wrap an iterable instance as a stream of elements.&lt;/p&gt;&#xA;&lt;h2 id=&#34;iterables-and-stream-operations&#34;&gt;Iterables and stream operations&lt;/h2&gt;&#xA;&lt;p&gt;The &lt;strong&gt;Iterable&lt;/strong&gt; interface does not have any &lt;code&gt;stream()&lt;/code&gt; method, so while the overall purpose at a high level remains the same, i.e., to traverse the elements, we cannot directly use an iterator to generate a stream for our custom use-cases.&lt;/p&gt;</description>
    </item>
    <item>
      <title>JDK - oracle build alternatives</title>
      <link>https://jvmaware.com/jdk-oracle-alternatives/</link>
      <pubDate>Sat, 21 Aug 2021 18:30:00 +0000</pubDate><author>sumit@dsadaily.com (sumit)</author>
      <guid>https://jvmaware.com/jdk-oracle-alternatives/</guid>
      <description>&lt;p&gt;Java language ecosystem can be viewed as a collection of &#xA;&#xA;&lt;a href=&#34;https://docs.oracle.com/javase/specs/&#34;  target=&#34;_blank&#34; &gt;Specifications&lt;/a&gt;, &#xA;&#xA;&lt;a href=&#34;https://jcp.org/en/jsr/overview&#34;  target=&#34;_blank&#34; &gt;Specification requests&lt;/a&gt;, and &#xA;&#xA;&lt;a href=&#34;https://openjdk.java.net/jeps/0&#34;  target=&#34;_blank&#34; &gt;Enhancement proposals&lt;/a&gt;. The specifications, when implemented, result in JDK, which is at the core of application development in the Java ecosystem.&lt;/p&gt;&#xA;&lt;p&gt;Together with &#xA;&#xA;&lt;a href=&#34;https://en.wikipedia.org/wiki/Java_virtual_machine&#34;  target=&#34;_blank&#34; &gt;JVM&lt;/a&gt; and &#xA;&#xA;&lt;a href=&#34;https://www.infoworld.com/article/3304858/what-is-the-jre-introduction-to-the-java-runtime-environment.html&#34;  target=&#34;_blank&#34; &gt;JRE&lt;/a&gt;, it allows end-to-end development ranging from small applications to large-scale enterprise applications. A standalone JDK setup includes a private JRE - a collection of JVM and other runtime libraries which allows us to compile, run and debug Java code.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Implementing a Custom Thread Pool</title>
      <link>https://jvmaware.com/custom-thread-pool/</link>
      <pubDate>Mon, 16 Aug 2021 16:19:41 +0000</pubDate><author>sumit@dsadaily.com (sumit)</author>
      <guid>https://jvmaware.com/custom-thread-pool/</guid>
      <description>&lt;p&gt;When working with multithreaded code, the availability of multi-core systems increases the overall application throughput quite significantly as long as the tasks and the available threads are managed effectively. However, as soon as things go out of control, the associated overhead outweighs the benefits achieved.&lt;/p&gt;&#xA;&lt;p&gt;In this article, we&amp;rsquo;ll explore some multithreading concepts by writing our very own custom thread pool to manage several tasks and threads. You can visit &#xA;&#xA;&lt;a href=&#34;https://en.wikipedia.org/wiki/Thread_pool&#34;  target=&#34;_blank&#34; &gt;this&lt;/a&gt; link for more details about thread pool data structure.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Suppressed Exceptions</title>
      <link>https://jvmaware.com/suppressed-exceptions/</link>
      <pubDate>Tue, 13 Jul 2021 17:24:37 +0000</pubDate><author>sumit@dsadaily.com (sumit)</author>
      <guid>https://jvmaware.com/suppressed-exceptions/</guid>
      <description>&lt;p&gt;Java provides a robust and efficient exception handling framework used in all sorts of applications irrespective of their size. Moreover, it allows us to create custom exceptions and handlers to better drive the application flow.&lt;/p&gt;&#xA;&lt;p&gt;If something goes wrong during the execution of a method, the &lt;strong&gt;method&lt;/strong&gt; creates an instance of an &lt;code&gt;Exception&lt;/code&gt; class that contains all the relevant details in the form of the &lt;strong&gt;stack trace&lt;/strong&gt; and hands it over to the runtime, i.e., JVM. This process is known as &lt;strong&gt;throwing&lt;/strong&gt; an exception.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Checked Collection - stronger type safety</title>
      <link>https://jvmaware.com/checked-collection/</link>
      <pubDate>Sun, 20 Jun 2021 07:23:27 +0000</pubDate><author>sumit@dsadaily.com (sumit)</author>
      <guid>https://jvmaware.com/checked-collection/</guid>
      <description>&lt;p&gt;With the introduction of generics in &lt;strong&gt;java5&lt;/strong&gt;, strong type-safety was built right-in when working with collections. &lt;strong&gt;Generics&lt;/strong&gt; allows us to ensure that only valid data is inserted into a list or any other collection.&lt;/p&gt;&#xA;&lt;p&gt;From a developer standpoint, these checks are quite important as they allows us to identify any erroneous scenarios at the compile time itself instead of the &#xA;&#xA;&lt;a href=&#34;https://en.wikipedia.org/wiki/Late_binding&#34;  target=&#34;_blank&#34; &gt;runtime&lt;/a&gt;. But the only way to reap its full benefit is by always using generic code.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Maintaining equals and compareTo contract</title>
      <link>https://jvmaware.com/equals-and-compareto/</link>
      <pubDate>Mon, 14 Jun 2021 16:01:33 +0000</pubDate><author>sumit@dsadaily.com (sumit)</author>
      <guid>https://jvmaware.com/equals-and-compareto/</guid>
      <description>&lt;p&gt;As a java developer, you must have been already following a famous principle to maintain the contract between the &lt;code&gt;hashCode&lt;/code&gt; and &lt;code&gt;equals&lt;/code&gt; methods.&lt;/p&gt;&#xA;&lt;p&gt;But we often ignore another equally important principle: to maintain the contract between equals and compareTo methods.&lt;/p&gt;&#xA;&lt;p&gt;Consider the following example and try to identify the output (&#xA;&#xA;&lt;a href=&#34;https://bugs.openjdk.java.net/browse/JDK-6394757&#34;  target=&#34;_blank&#34; &gt;JDK-6394757&lt;/a&gt;):&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;public&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;static&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;void&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;main&lt;/span&gt;(String&lt;span style=&#34;color:#f92672&#34;&gt;[]&lt;/span&gt; args) {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    test(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;A&amp;#34;&lt;/span&gt;);&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    test(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;A&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;C&amp;#34;&lt;/span&gt;);&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;private&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;static&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;void&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;test&lt;/span&gt;(String... args) {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;var&lt;/span&gt; caseInsensitiveSet &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;new&lt;/span&gt; TreeSet&lt;span style=&#34;color:#f92672&#34;&gt;&amp;lt;&amp;gt;&lt;/span&gt;(String.&lt;span style=&#34;color:#a6e22e&#34;&gt;CASE_INSENSITIVE_ORDER&lt;/span&gt;);&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    caseInsensitiveSet.&lt;span style=&#34;color:#a6e22e&#34;&gt;addAll&lt;/span&gt;(List.&lt;span style=&#34;color:#a6e22e&#34;&gt;of&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;a&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;b&amp;#34;&lt;/span&gt;));&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    caseInsensitiveSet.&lt;span style=&#34;color:#a6e22e&#34;&gt;removeAll&lt;/span&gt;(List.&lt;span style=&#34;color:#a6e22e&#34;&gt;of&lt;/span&gt;(args));&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    System.&lt;span style=&#34;color:#a6e22e&#34;&gt;out&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;println&lt;/span&gt;(caseInsensitiveSet);&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The sample code, when tested on &lt;strong&gt;&#xA;&#xA;&lt;a href=&#34;mailto:openjdk@1.16.0&#34; &gt;openjdk@1.16.0&lt;/a&gt;&lt;/strong&gt; produces the unexpected output:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Logging - information vs noise</title>
      <link>https://jvmaware.com/logging/</link>
      <pubDate>Fri, 11 Jun 2021 10:03:29 +0000</pubDate><author>sumit@dsadaily.com (sumit)</author>
      <guid>https://jvmaware.com/logging/</guid>
      <description>&lt;p&gt;A log file is logically equivalent to a &lt;strong&gt;flight recorder&lt;/strong&gt; in an aircraft. It keeps track of everything happening inside the application context (and sometimes system or external environment-related information). Thus, whenever we need any insight into the application (be it any functional scenario investigation or troubleshooting any technical issue), the log file is our door to the mystery land.&lt;/p&gt;&#xA;&lt;p&gt;But for a moment, let&amp;rsquo;s try to visualize the situation that we might end up in if we do not pay attention to any logging best practices or follow any templates.&lt;/p&gt;</description>
    </item>
    <item>
      <title>About</title>
      <link>https://jvmaware.com/about/</link>
      <pubDate>Mon, 07 Jun 2021 10:17:21 +0000</pubDate><author>sumit@dsadaily.com (sumit)</author>
      <guid>https://jvmaware.com/about/</guid>
      <description>&lt;p&gt;Hello, my name is Sumit Gaur.&lt;/p&gt;&#xA;&lt;p&gt;&#xA;&#xA;&lt;a href=&#34;https://jvmaware.com/&#34;  target=&#34;_blank&#34; &gt;This&lt;/a&gt; is my corner of the internet where I write about software design and implementation using &lt;strong&gt;java&lt;/strong&gt; as the primary programming language.&lt;/p&gt;&#xA;&lt;p&gt;I mostly write about the language features and implementation techniques that I find helpful in my day-to-day life as a developer, hoping that you too will find those helpful.&lt;/p&gt;&#xA;&lt;p&gt;The best way to contact me is via email: &#xA;&#xA;&lt;a href=&#34;mailto:sumit@jvmaware.com&#34; &gt;sumit at jvmaware dot com&lt;/a&gt;. If you have any suggestions regarding the posts or any specific topic you want me to cover, please drop a one-liner to start the conversation.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Container Aware - running java applications inside containers</title>
      <link>https://jvmaware.com/container-aware-jvm/</link>
      <pubDate>Sat, 10 Apr 2021 18:30:00 +0000</pubDate><author>sumit@dsadaily.com (sumit)</author>
      <guid>https://jvmaware.com/container-aware-jvm/</guid>
      <description>&lt;p&gt;With more and more organizations adopting containers as their preferred mode of deploying packages, it is essential than ever to understand the inner workings of containerized execution environments, especially how policing is done for resources like memory, CPU in a container.&lt;/p&gt;&#xA;&lt;p&gt;As we know, a container is an isolated process running on a host machine. We can set the amount of resources available to it using host operating system features like namespace isolation and control groups (also known as cGroups). &lt;strong&gt;For example&lt;/strong&gt;:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Some important java projects - April 2021 edition</title>
      <link>https://jvmaware.com/projects/</link>
      <pubDate>Thu, 01 Apr 2021 18:30:00 +0000</pubDate><author>sumit@dsadaily.com (sumit)</author>
      <guid>https://jvmaware.com/projects/</guid>
      <description>&lt;p&gt;We see new features being added to the java programming language faster than ever with the six-monthly release cycle. This article will explore some of the important projects currently in the development (incubation, preview, early access) stage. We will not be exploring the topics in detail, but this will be a curated list of the official documents for easy reference.&lt;/p&gt;&#xA;&lt;p&gt;Also, we can&amp;rsquo;t say for sure when these will be released to the general users, but it is something that will keep us motivated to continue using java at least for the foreseeable future:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Streaming large dataset over Rest</title>
      <link>https://jvmaware.com/streaming-json-response/</link>
      <pubDate>Wed, 17 Mar 2021 18:30:00 +0000</pubDate><author>sumit@dsadaily.com (sumit)</author>
      <guid>https://jvmaware.com/streaming-json-response/</guid>
      <description>&lt;p&gt;Java8 streams provide a convenient way to process large amounts of data leveraging the underlying multi-core hardware capabilities (in most cases). But is it possible to extend these features to our DAO layer as well? We&amp;rsquo;ll try to explore the options in this post.&lt;/p&gt;&#xA;&lt;p&gt;Please note that we&amp;rsquo;ll not be focusing on the reactive streams implementations like &lt;strong&gt;WebFlux&lt;/strong&gt;, &lt;strong&gt;RSocket&lt;/strong&gt;, etc., in this post. We will focus on the native streaming capabilities provided by SpringMVC out of the box.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to manage multiple Java versions on Windows PC?</title>
      <link>https://jvmaware.com/multiple-java-versions/</link>
      <pubDate>Sun, 14 Feb 2021 18:30:00 +0000</pubDate><author>sumit@dsadaily.com (sumit)</author>
      <guid>https://jvmaware.com/multiple-java-versions/</guid>
      <description>&lt;p&gt;When Oracle decided to go with the six-month release cycle for new Java versions, many developers started to work with more than one Java version at a time.  It is relatively easy to switch between different versions on a Mac or Linux-based system, thanks to utilities like Jabba and jEnv; But on Windows, this is not as straightforward.&lt;/p&gt;&#xA;&lt;p&gt;&#xA;&#xA;&lt;a href=&#34;https://github.com/shyiko/jabba&#34;  target=&#34;_blank&#34; &gt;Jabba&lt;/a&gt; can install multiple Java versions on a Windows PC machine, but it does not set the corresponding &lt;strong&gt;persistent&lt;/strong&gt;&lt;code&gt;JAVA_HOME&lt;/code&gt; or &lt;code&gt;Path&lt;/code&gt; variables for the current user. &#xA;&#xA;&lt;a href=&#34;https://www.jenv.be/&#34;  target=&#34;_blank&#34; &gt;jEnv&lt;/a&gt;, on the other hand, does not work at all on Windows PC machine and can only be used for Mac or Linux based setups.&lt;/p&gt;</description>
    </item>
    <item>
      <title>LRU Cache</title>
      <link>https://jvmaware.com/lru-cache/</link>
      <pubDate>Fri, 15 Jan 2021 18:30:00 +0000</pubDate><author>sumit@dsadaily.com (sumit)</author>
      <guid>https://jvmaware.com/lru-cache/</guid>
      <description>&lt;p&gt;&lt;strong&gt;Caching&lt;/strong&gt; in computer science represents a technique to keep frequently used items in low latency memory compared to high latency disks or databases. This allows us to retrieve those items quickly when required and thus improve the application&amp;rsquo;s overall performance.&lt;/p&gt;&#xA;&lt;p&gt;But due to the limited resources available, we can only keep a finite number of elements in memory at any given point in time. This requires us to decide on an &lt;strong&gt;eviction&lt;/strong&gt; policy, which will remove the cached items when there is no more space left to add new items.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Optimistic vs Pessimistic Locking</title>
      <link>https://jvmaware.com/optimistic-pessimistic-locking/</link>
      <pubDate>Mon, 04 Jan 2021 18:30:00 +0000</pubDate><author>sumit@dsadaily.com (sumit)</author>
      <guid>https://jvmaware.com/optimistic-pessimistic-locking/</guid>
      <description>&lt;p&gt;Before we dive deep into the details of the two lock types, let&amp;rsquo;s first try to understand the need for locking and how it is actually implemented.&lt;/p&gt;&#xA;&lt;p&gt;As we know every time there are more tasks(threads) spawned by a process than the available number of CPU cores, the operating system &lt;strong&gt;mimics parallelism&lt;/strong&gt; by &lt;strong&gt;concurrency&lt;/strong&gt; management. The same is achieved via &lt;strong&gt;context switching&lt;/strong&gt;. In other words, the operating system creates an illusion of parallel execution of these threads by rapidly allocating underlying resources (CPU core(s) in this case) in addition to making sure that the tasks do not conflict with each other.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Using enum as a Simple Factory</title>
      <link>https://jvmaware.com/enum-as-factory/</link>
      <pubDate>Fri, 18 Dec 2020 18:30:00 +0000</pubDate><author>sumit@dsadaily.com (sumit)</author>
      <guid>https://jvmaware.com/enum-as-factory/</guid>
      <description>&lt;p&gt;The factory design pattern is one of the most commonly used design pattern. Its various variants like &lt;strong&gt;simple factory&lt;/strong&gt;, &lt;strong&gt;factory method&lt;/strong&gt; and &lt;strong&gt;abstract factory&lt;/strong&gt; helps you write code that follows high level of abstraction, keeping the low level details (like instantiation, object reuse, etc.) hidden from the client code.&lt;/p&gt;&#xA;&lt;p&gt;When implementing &lt;strong&gt;simple factory&lt;/strong&gt;, the idea is to provide details of the &lt;strong&gt;required class to be instantiated&lt;/strong&gt; and the factory class will take care of the rest. The input details should be sufficient for the factory class to uniquely identify the class type to be instantiated.&lt;/p&gt;</description>
    </item>
    <item>
      <title>JGit - manage git workflow programmatically</title>
      <link>https://jvmaware.com/jgit/</link>
      <pubDate>Sat, 12 Dec 2020 18:30:00 +0000</pubDate><author>sumit@dsadaily.com (sumit)</author>
      <guid>https://jvmaware.com/jgit/</guid>
      <description>&lt;p&gt;&#xA;&#xA;&lt;a href=&#34;https://www.eclipse.org/jgit/&#34;  target=&#34;_blank&#34; &gt;JGit&lt;/a&gt; developed by the Eclipse Foundation is a java implementation of the git workflow. When included as a &#xA;&#xA;&lt;a href=&#34;https://mvnrepository.com/artifact/org.eclipse.jgit/org.eclipse.jgit&#34;  target=&#34;_blank&#34; &gt;maven&lt;/a&gt; or gradle dependency, it allows you to execute most of the git cli commands programmatically, removing the dependency triggering external commands from a java program.&lt;/p&gt;&#xA;&lt;p&gt;As part of this post, we’ll explore the usage of JGit for some commonly used commands:&lt;/p&gt;&#xA;&lt;h2 id=&#34;init&#34;&gt;init&lt;/h2&gt;&#xA;&lt;p&gt;The init command is used by git to initialize a blank repository on a local system which can then be linked to a remote repository. A hidden &lt;strong&gt;.git&lt;/strong&gt; directory is created inside the working directory which holds all the configuration files corresponding to the remote repository.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Remote Proxy Pattern</title>
      <link>https://jvmaware.com/remote-proxy/</link>
      <pubDate>Sun, 29 Nov 2020 18:30:00 +0000</pubDate><author>sumit@dsadaily.com (sumit)</author>
      <guid>https://jvmaware.com/remote-proxy/</guid>
      <description>&lt;p&gt;The &lt;strong&gt;proxy design pattern&lt;/strong&gt; helps us in scenarios where we want to &lt;strong&gt;substitute actual instance&lt;/strong&gt; with a placeholder. Assuming the actual instance to be a &lt;strong&gt;remote service instance&lt;/strong&gt;, we can use the design pattern to implement a client-server model allowing us to segregate the complex business logic as a separate layer.&lt;/p&gt;&#xA;&lt;p&gt;Another advantage of this implementation is the minimal footprint of code (mostly boilerplate), required to manage request-response, in case there are multiple services with more than 1 method.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Prioritize tasks in a Thread Pool Executor</title>
      <link>https://jvmaware.com/priority-queue-and-threadpool/</link>
      <pubDate>Sat, 21 Nov 2020 06:04:42 +0530</pubDate><author>sumit@dsadaily.com (sumit)</author>
      <guid>https://jvmaware.com/priority-queue-and-threadpool/</guid>
      <description>&lt;p&gt;While &lt;code&gt;java.util.concurrent.Executors&lt;/code&gt; provides a lot of factory and utility methods to create &lt;code&gt;ThreadPoolExecutor&lt;/code&gt; with various combinations of underlying resources (threadFactory, poolSize etc), the default configurations might not be sufficient for every use-case.&lt;/p&gt;&#xA;&lt;p&gt;Consider the use-case where you want to &lt;strong&gt;prioritize&lt;/strong&gt; the tasks submitted so that they are executed based on their &lt;strong&gt;priority&lt;/strong&gt; and not the order of their submission. But as the default configuration uses a &lt;code&gt;LinkedBlockingQueue&lt;/code&gt; (as mentioned below), this will not serve the purpose.&lt;/p&gt;</description>
    </item>
    <item>
      <title>HashCode Calculation</title>
      <link>https://jvmaware.com/hashcode-calculation/</link>
      <pubDate>Mon, 02 Sep 2019 06:04:42 +0530</pubDate><author>sumit@dsadaily.com (sumit)</author>
      <guid>https://jvmaware.com/hashcode-calculation/</guid>
      <description>&lt;p&gt;Assuming that you are already aware of the concept of hashing and hash functions in general, this post is an attempt to highlight the details of how the hash function is implemented in &#xA;&#xA;&lt;a href=&#34;https://docs.oracle.com/javase/8/docs/api/java/util/HashMap.html&#34;  target=&#34;_blank&#34; &gt;java8&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s take a quick look at the below-mentioned snippet from &lt;strong&gt;java8 (1.8.0_221)&lt;/strong&gt; - &lt;code&gt;HashMap&lt;/code&gt; class:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;// Computes key.hashCode() and spreads (XORs) higher bits of hash&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;// to lower.  Because the table uses power-of-two masking, sets of&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;// hashes that vary only in bits above the current mask will&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;// always collide. &lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;static&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;final&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;int&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;hash&lt;/span&gt;(Object key) {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;int&lt;/span&gt; h;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;return&lt;/span&gt; (key &lt;span style=&#34;color:#f92672&#34;&gt;==&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;null&lt;/span&gt;) &lt;span style=&#34;color:#f92672&#34;&gt;?&lt;/span&gt; 0 : (h &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; key.&lt;span style=&#34;color:#a6e22e&#34;&gt;hashCode&lt;/span&gt;()) &lt;span style=&#34;color:#f92672&#34;&gt;^&lt;/span&gt; (h &lt;span style=&#34;color:#f92672&#34;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; 16);&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;From the above-mentioned code, we can see that the hash method:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Bitwise Operators</title>
      <link>https://jvmaware.com/bitwise-operators/</link>
      <pubDate>Fri, 17 May 2019 06:04:42 +0530</pubDate><author>sumit@dsadaily.com (sumit)</author>
      <guid>https://jvmaware.com/bitwise-operators/</guid>
      <description>&lt;p&gt;Bitwise operators are used in a class of algorithms where instead of performing common operations like addition, comparisons, etc on the decimal numbers, those are performed on the individual bits that comprise those numbers.&#xA;The bitwise operations are considered very efficient as compared to their decimal counterparts.&lt;/p&gt;&#xA;&lt;p&gt;Following is the list of bitwise operators:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;strong&gt;Bitwise AND (&amp;amp;)&lt;/strong&gt;: Performs bitwise AND on the individual bits of the two operands. The result of this operation results in a set bit if the two operands were also set (1)and unset (0) otherwise.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
