Saturday, April 19, 2025

I Took 7 Apache Kafka Courses Online - Here’s Top 5 Which Actually Helped Me?

Hello guys, you might have heard about Apache Kafka, the next generation, Big Data messaging system which is handling billions of messages per day on companies like LinkedIn, Uber, Airbnb, Twitter, etc. It's a revolutionary technology and perfect for today's mission-critical application which has so much data to process and analyze. Since last year, I have been taking a lot of resources like books, courses, and tutorials to learn these sunrise technologies like Apache Kafka so that you can aware of these and learn them to make yourself more valuable or jump into some exciting career path. For example, In the past, I have shared some awesome courses on Big Data, Spark, and Hadoop and many of my readers requested me to share similar suggestions for Apache Kafka.

Wednesday, April 16, 2025

10 Java Exception and Error Interview Questions Answers

You will always see some interview questions from Exception and Error handling in core Java Interviews. Exception handling is an important aspect of Java application development and its key to writing robust, stable Java programs, which makes it natural favorites on interviews. Questions from Error and Exception in Java mostly based on the concept of Exception and Error in Java, How to handle Exception , best practices to follow during Exception handling etc. Though multithreading, garbage collection, JVM concepts and questions from object oriented design rules these interviews, you should always expect and prepare some questions on effective error handling.

10 Examples of SED Command in UNIX and Linux

SED command in UNIX stands for stream editor and it can perform lots of functions on file like searching, find and replace, insertion or deletion. Though the most common use of SED command in UNIX is for a substitution or for find and replace. By using SED you can edit files even without opening it, which is a much quicker way to find and replace something in the file, than first opening that file in VI Editor and then changing it. In this SED command tutorial, we will see some practical examples of SED commands in UNIX based systems e.g. Linux. I must say having a good grip on the find, grep, sort, vi editors and SED can take you next level of UNIX and Linux working experience.

Monday, April 14, 2025

Why Avoid Comparing Integers in Java using == Operator? Integer Cache Example

Java 5 introduced auto-boxing which automatically converts int to Integer and because of that many Java developers started writing code for comparing int variable to Integer object and Integer to Integer using == operator. You should avoid that because it can create subtle bugs in your program because it only works for a particular range of integers and not for all. There is another problem as well when you compare the int variable to the Integer object using == operator, the Integer object is converted to a primitive value. This can throw a null pointer exception if the Integer object is null, which can crash your program.

Saturday, April 12, 2025

How to Create, Update and Remove Soft link in Linux and UNIX - Example

Symbolic links, Symlink or Soft link in Unix are a very important concept to understand and use in various UNIX operating systems e.g. Linux, Solaris, or IBM AIX. Symlinks give you so much power and flexibility that you can maintain things quite easily. I personally feel that along with find, grep and other UNIX commands, the command to create a soft link and update soft link i.e. ln -s is also a must for anyone working in the UNIX machine. Whenever I do scripting or write any UNIX script I always write for symlinks rather than pointing to the absolute path of directories in UNIX.

How to Reverse an Array in Java? Integer and String Array Example Tutorial

This Java tip is about, how to reverse an array in Java, mostly primitive types e.g. int, long, double and String arrays. Despite of Java’s rich Collection API, use of array is quite common, but standard JDK doesn’t have great utility classes for Java. It’s difficult to convert between Java Collection e.g. List, Set to primitive arrays. Java’s array utility class java.util.Arrays, though offers some the critical functionalities like comparing arrays in Java and support to print arrays, It lacks a lot of common features, such as combining two arrays and reverse primitive or object array. 

Top 21 final modifier (keyword) Interview Questions and Answers in Java

The final modifier is one of the important keywords in Java. You can use this with a class, method, and variable as well. Good knowledge of the final keyword is not only essential for writing good, performant, and secure Java programs but also to clear any  Java interview. The interviewer pays special attention to the final keyword and expects candidates to know how and when to use the final modifier with variables, methods, and classes. In this article, I have collected Java interview questions that are based upon the concept of the final modifier. You might have seen many of these questions on both telephonic and face-to-face rounds. 

How to format Decimal Number in Java? DecimalFormat Example

We often need to format decimal numbers in Java like formatting numbers up to 2 decimal places or 3 decimal places or we want to introduce leading zeros in front of numbers. Thankfully Java programming language provides many different ways to format numbers in Java like either using Math.round() or setScale() from BigDecimal but the caveat is that they also do rounding of numbers i.e. 1.6 will be rounded on 2.0 if we use Match.round(). If we are just interested in formatting decimal numbers up to n decimal digits then DecimalFormat is the way to go. java.text.DecimalFormat descends from NumberFormat and provides a dynamic way of formatting numbers in Java.

Introduction to Tibco Hawk for Beginners? Tutorial

Tibco Hawk
This is another short  TIBCO tutorial from my TIBCO tutorial series. in this i am gonna discuss what is TIBCO hawk , Where do we use TIBCO hawk , What are components of TIBCO hawk , what benefit TIBCO hawk offers and how Tibco hawk works.  if you are interested to know more about TIBCO  Rendezvous , TIBCO EMS and there fundamental concept  or if you are looking for some TIBCO Interview questions you may find this link interesting TIBCO Tutorial

What is Repeating groups in FIX Protocol? Example

FIX Protocol repeating group
In this FIX protocol tutorial, I am going to share my experience about FIX repeating block or group. This is a fundamental concept of FIX protocol and used to carry repeating data. A correct understanding of various available FIX repeating groups e.g. PartyID block, Allocation repeating group etc is very important for writing FIX based software. In this FIX tutorial, I will explain about how to parse a repeating group, how to prepare a repeating group and how to understand a repeating group. If you like to know more about basic concepts in FIX protocol then you may find my FIX Protocol tutorial interesting.

Friday, April 11, 2025

Java.net.BindException: Address already in use: JVM_Bind:8080 [Solved]

java.net.BindException: Address already in use: JVM_Bind is a common exception in Java with applications trying to connect on a particular port and some other processes either Java or non Java is already connected on that port. You can get "Address already in use: JVM_Bind" error while doing remote debugging in Java in Eclipse, when Eclipse trying to connect to remote Java application when you are starting tomcat and another instance of tomcat is listening on port 8080 you will get java.net.BindException: Address already in use: JVM_Bind:8080.

10 Examples of chmod command in UNIX Linux

chmod command in UNIX or Linux is used to change file or directory permissions. This is one of many UNIX basic commands which a UNIX or Linux user must be familiar with. In this UNIX command tutorial we will see how to change file permissions using the chmod command, what are file permissions in UNIX, how to change permissions of directory and sub-directory using UNIX chmod command and finally how to create executable files in UNIX using the chmod command. Before going directly into examples of chmod command let's spend a few minutes on understanding file permissions in UNIX and why do we need to change file permissions etc.

Java Tips and Best practices to avoid NullPointerException in Java Applications

A NullPointerException in Java application is the best way to solve it and that is also key to write robust programs that can work smoothly. As it said “prevention is better than cure”, same is true with nasty NullPointerException. Thankfully by applying some defensive coding techniques and the following contracts between multiple parts of an application, you can avoid NullPointerException in Java to a good extent. By the way, this is the second post on NullPointerException in Javarevisited, In the last post, we have discussed the common causes of NullPointerException in Java and in this tutorial,  we will learn some Java coding techniques and best practices, which can be used to avoid NullPointerException in Java.

Insertion Sort Algorithm in Java with Example and Explanation

The Insertion sort is another simple sorting algorithm, which can be used to sort any linear data structure like an array or linked list. On simplicity, this is next to bubble sort, and it’s also pretty close to how humans manually sort something (for example, a hand of playing cards). As the name suggests, the Insertion sort is based upon the insertion of an element in a sorted list. To start, we assume that the first element is already sorted. Then we pick the next element and put it in second place, we compare this number with the first element and if they are not in sorted order, we swap them. This gives a new sorted list of 2 elements.

How to Execute Native Shell commands from Java Program? Example

How to execute native shell commands from JAVA
Though it’s not recommended some time it’s become necessary to execute a native operating system or shell command from Java, especially if you are doing some kind of reporting or monitoring stuff and required information can easily be found using the native command. This is not advised though because then you will lose platform independence which is why we mostly used Java. Anyway, if you have no choice and you want to execute native commands from Java then it's good to know that how we can do it, many of you probably know this but for those who don't know and have never done it, we will see through an example.