Top 10 Algorithms books Every Programmer Should Read

Algorithms are language agnostic, and any programmer worth their salt should be able to convert them to code in their programming language of choice. Unfortunately, I have come across several programmers who are REALLY good at programming languages like Java or Python, like know minor details of API and language intricacies but have very poor knowledge of the fundamentals of Algorithms and Data Structures. Just ask them to implement any popular sorting algorithms like quicksort or merge sort, and they will fall apart. If you expect them to know more advanced and sophisticated algorithms like String processing algorithms, graph algorithms, tree traversal, or greedy algorithms, be ready to check on Interviews; otherwise, you might end up with some surprises.

10 Books and Courses to Prepare Technical Programming/Coding Job Interviews in 2024

If you are preparing for a technical interview in the software development sector and looking for some great books to boost your preparation, then you have come to the right place. In the past, I have hared some of the best online courses to prepare coding interviews. In this article, I am going to share some of the best programming/coding interview books to prepare well for any software development jobs. These books are enough to crack even the toughest of the job interviews at GoogleAmazon, or Microsoft. They provide excellent coverage of all essential topics for programming job interviews like data structure and algorithms, system design, algorithm design, computer science fundamentals, SQL, Linux, Java, Networking, etc.

5 Examples of map() and flatMap() in Java 8 Stream

The map() and flatMap() are prince and princess of functional programming in Java. They are two powerful methods of Stream API which I believe every Java developer should be aware of and should also master it. You can use map() and flatMap() for data transformation, dealing with database operations where you need to convert one object to another while saving or reading from database. You can also use them for parsing and formatting as well as when you want to remove boiler plate code and make your data pipeline concise. The map() function is used in functional programming to transform each element of Stream into another element. 

Top 21 String Programming and Coding Interview Questions With Solutions

In this article, I am going to share 21 of the most common String-based Programming and Coding interview questions from Java developer interviews. These questions require you to write code to solve the problem and they are different from traditional Java String questions like how the substring method works in Java? or when to use the intern() method of String in Java? Since coding and problem solving are an important part of any programming job interview, it's imperative that you know how to solve them in time and in a pressure situation, which comes only after doing practice with the right set of questions. Since these questions are already tried and tested and appeared in many interviews, they will provide you the experience you need to crack your coding interview.

Top 21 jQuery interview Questions and Answers

Hello guys, if you are preparing for web developer interviews then preparing for jQuery questions can benefit you. While many people will say that jQuery is dead but its not dead and I am still working with projects which are using jQuery for little to big things. That's why its important to know about basic jQuery concepts and interview questions based upon that. In the past, I have shared several JavaScript and web development interview questions and in this article I am going to share jQuery questions like what is $() etc. What are selectors? how does they work etc. You can use this questions to quickly revise key jQuery concepts for interviews.  So what are we waiting for, let's see the basic jQuery interview questions for web developers.

Top 21 Maven Interview Questions Answers for Java Developers

Hello guys, for a Java developer, Maven in one of the essential tool and its used to build your Java application. Since most of the Java projects used Maven for building, it is expected from a Java developer that he knows Maven and knows it well. That's why Maven questions are quite common on Java developer interviews but I have seen many Java programmers coming to these interview unprepared and not able to answer most of the questions on tools like Maven, Gradle or even git. When I asked one candidate why don't you prepare for Maven before your Java interviews, he said, I wasn't able to find any list of Maven questions. 

How to enable or disable form elements using jQuery? Examples

In last couple of tutorials you have learned how to get all selected checkbox and radio buttons, and in this tutorial, you will learn how to enable/disable form elements using jQuery. A form element e.g. a textfield, radio buttons and checkbox, all represented using input tag can be enabled or disabled by adding an attribute called "disabled". It's similar to "checked" attribute we have seen for checkbox and radio buttons. If this attribute is not present then element is enable, but if this attribute is present then you can use disabled=true to disable the form element and disabled=false to enable the form elements as shown in our example. Like previous example of checking/unchecking checkbox, you can use prop() jQuery function to enable/disable form element if you are running on jQuery 1.6 or higher version and attr() function if you are running on jQuery 1.5 or lower version. 

How to shuffle a List in Java? Collections.shuffle() Example

Hello guys, if you have a List of numbers and you want to shuff it but don't know how then you have come to the right place. Shuffling is an important technique which is used quite a lot on coding games like number guessing games and card games., The java.util.Collections class provides shuffle() method which can be used to randomize objects stored in a List in Java. Since List is an ordered collection and maintains the order on which objects are inserted into it, you may need to randomize elements if you need them in a different order. Collections.shuffle() method uses default randomness to randomize elements but you also have an overloaded version of shuffle() to provide an instance of the java.util.Random object, which can be used to randomize elements.

How to Compare Two Dates in Java? Check If They Are Equal, Later or Earlier - Examples

There are multiple ways to compare two dates in Java, it also depends on what exactly comparison means. If you are looking to compare two dates to find out whether they are equal or not, then you can simply use the equals() method of java.util.Date class. This method will return true if both dates are equal, precisely both have the same millisecond value. If you are looking to find out whether a date comes before or after another date then you have 3 choices, you can use the compareTo() method of java.util.Date class, or you can use before() and after() method of Date class, or you can use before() and after() method of Calendar class. I suggest leveraging the before() and after() method of the Date class, they are more readable and easy to use.

What is transient variable in Java? Serialization Example

What is a transient variable in Java?
transient variable in Java is a variable whose value is not serialized during Serialization and which is initialized by its default value during deserialization, for example for object transient variable it would be null. This behavior can be customized by using a custom Serialized form or by using the Externalizable interface. A transient variable is used to prevent any object from being serialized and you can make any variable transient by using the transient keyword. You cannot make a local variable transient through and it's only the member variables which can be transient. 

Difference between HashSet and HashMap in Java? Answered

HashSet and HashMap in Java
Hello friends, if you have given Java developer interview then there is good chance that you may have come across questions like Difference between HashSet vs HashMap or HashSet vs TreeSet etc. In this article, we are going to discuss differnece between HashMap and HashSet, two of the popular Collection classes from JDK. The HashSet vs HashMap is a classical Java Collection interview question that focuses on What are differences between HashSet and HashMap in terms of features, usage, and performance. If you are in Java programming even for a year or so, you are likely to be familiar with What is HashSet in Java and What is HashMap in Java, these two are the most popular collection classes. 

What is PATH and CLASSPATH in Java? Path vs ClassPath Example

What is PATH and CLASSPATH in Java
The PATH and CLASSPATH are the two most important environment variables of the Java environment which are used to find the JDK binaries used to compile and run Java in windows and Linux and class files which are compiled Java bytecodes. From my personal experience I can say that PATH and CLASSPATH are the two most problematic things for beginners in Java programming language due to two reasons; first because in most Java courses nobody tells details of what is a PATH and CLASSPATH, What do PATH and CLASSPATH do, What is meaning of setting PATH and CLASSPATH, What happens if we do not set them, Difference between PATH vs CLASSPATH in Java or simply How Classpath works in Java, etc. 

Why is main method public, static, and void in Java? Answer

What is the main method in Java?
The main() method in Java is a special method that is used by JVM to start the execution of any Java program. The main method is also referred to as the entry point of Java application which is true in the case of core Java applications because execution starts from the main() method, but in the case of container-managed environments like Servlet, EJB, or MIDlet this is not true as these Java programs have their own life-cycle methods like init(), service() or destroy() for Servlet's which is used by the container. The main method in Java is run by the main thread which is a non-daemon thread and the Java program runs until the main method finishes or any other user thread is running. 

How to convert JSON String to Java Object using Gson? JSON Deserialization Example

Hello Java Programmers, In the last article, you have learned how to convert a Java object to JSON String and in today's article, you will learn the opposite, i.e. converting a JSON String to a Java object. The first example was known as JSON serialization example and this one is known as JSON deserialization because we are creating a Java object from a String. The idea is very similar to classical Serialization in Java where you convert a Java object to another binary format that can be transported over the network or can be saved in the disk for further usage.

Difference between var, val, and def in Scala? Examples

Hello guys, if you are new to Scala or preparing for Scala interview then you may have come across the question, what is difference between var, val, and def keywords in Scala? This is one of the frequently asked questions from Scala interviews. Even though both var and val keyword is used to declare variables in Scala there is a subtle difference between them. A var is a variable. It’s a mutable reference to a value. Since it’s mutable, its value may change throughout the program's lifetime. On the other hand, the val keyword represents a value. It’s an immutable reference, meaning that its value never changes. Once assigned it will always keep the same value.