In many programming job interview this question has been asked. If you are coming from Python programming background(or you are novice Java programmer) then definitely “==” operator will pop-up in your mind. But in Java, “==” may not give you the right result. equals() method is also used to compare the object. Operator “==” and […]

,

This is a simple tutorial about making jar file and compiling the source code using command. As you may know that in java the class are packaged in jar file and provides as library. So it can be used in different module/project. First we are going to make some suitable directory structure. Run the following […]

, ,

One of theĀ favoriteĀ basic questions asked by the interviewers: Q. Write a function to swap two integers? A “C” programmer will write function similar to . But what if you are asked to implement the same method in Java, then you will answer that pointer concept doesn’t exist in Java. Everything in Java is reference. And […]

, ,

In code development, be it one or the other requirement, we need to access the environment variable. In this post, the environment variable will be read/set in 5 different programming languages. C language In C, environment variables can be read and set by getenv() and putevn() methods respectively. The example code is shown below. Java […]

, , ,

Suppose you are working on a project and want to include a library jar file which has specific java class. But at the same time you don’t have much idea about which jar file to include and you are given with a lot of jar files to choose from. How would you figure out which […]

, , ,