Java

Effective Java: try v/s try with resources

Reading Time: 3 minutes It’s not uncommon to acquire resources while developing and forgetting to close them. For example, InputStream is a resource that would be explicitly needed to be closed and hence can be often overlooked.  To effectively work with our resources it is important that we return the resources as soon as we are done using them else they may lead to performance consequences. One of the Continue Reading

Performance Benchmarking Akka Actors vs Java Threads

Reading Time: 3 minutes Think of a scenario where you are standing in front of a long queue of your cafeteria to order your favorite food. Some people might get so frustrated that they leave the queue without even ordering. Thinking of these types of situations cafeteria management decided to introduce a token system. You can simply sit and chit-chat with your friends while waiting for your token number. Continue Reading

Delta Lake To the Rescue

Reading Time: 4 minutes Welcome Back. In our previous blogs, we tried to get some insights about Spark RDDs and also tried to explore some new things in Spark 2.4. You can go through those blogs here: RDDs – The backbone of Apache Spark Spark 2.4: Adding a little more Spark to your code In this blog, we will be discussing something called a Delta Lake. But first, let’s Continue Reading

JSON Web Token (JWT): A Complete Guide

Reading Time: 5 minutes In this blog, we are going to talk about a very powerful yet simple way to represent an user identity securely during a two-party interaction. What I mean to say, when two systems exchange data we can identify an user without having to send private credentials on every request. But how it is possible? The answer is JSON Web Token. So, we are going to Continue Reading

Akka-Http Marshalling and Unmarshalling in JAVA

Reading Time: 3 minutes Hello folks! In today’s HTTP request/response world, we may get different types of data from a client side application which we need to process and send an appropriate response. This may get a bit of a mess. To solve this, we can use the marshalling and unmarshalling feature of Akka-Http for easier conversion of theses data. In this blog, we will be looking how to Continue Reading

Encryption with PBKDF2

Reading Time: 4 minutes Passwords can be the most valuable data to an attacker because stolen passwords can provide attackers the ability to bypass most of the security perimeters that exists in the system. Since lot of people use the same password in several other systems, one system compromise can affect the security of other systems too. This is where we can use encryption as a solution for theses Continue Reading

Functional Java: It’s good to be lazy

Reading Time: 5 minutes In Java, we are often tempted towards writing a code which is executed eagerly. There’s a good reason for that – eager code is easy to write and to reason about. But delaying commitments until the last responsible moment is a good agile practice. When executing the code, we can gain performance by being just a little lazy.  In this blog, we will try to Continue Reading

What can we do with the static keyword in java?

Reading Time: 3 minutes As we all know that we can make static variable, method or class. We know what it can do. If we make a variable static then that variable scope is present for the entire run of the program. Its memory is shared by all the object of the class in which it is declared. We make the method so that it can not be inherited. Continue Reading

Java: back to basics.

Constructors vs Static factory methods

Reading Time: 4 minutes Instantiating the object of the class isn’t really the most difficult job in the world. Rather I’d say its one of the most basic things about any programming language. As you must’ve guessed it, I’m referring to a constructor. A constructor is a method whose name is the same as that of the class its part of, and which returns the instance of the class. Continue Reading

Knoldus Pune Careers - Hiring Freshers

Get a head start on your career at Knoldus. Join us!