Disclosure: This article may contain affiliate links. When you purchase, we may earn a small commission.

Top 15 SQL Server Management Studio (SSMS) Keyboard Shortcuts and Tips

SQL Server Management Studio, also known as SSMS is an essential tool for Microsoft SQL Server developers as well as any full-stack Java developer whose application is using SQL Server database in the backend. It allows you to connect to the MSSQL database, execute SQL queries, check execution plan, see table and schema detail, writing and debugging stored procedures, and many more features. Imagining life without SSMS for SQL Server DBA and developer is impossible. 

10 Tools Every Software Developer/Programmer Should Learn in 2023 [UPDATED]

Every trade has its tools, and software development is no different. A good programmer or software developer generally knows their tools better than others and also has access to more powerful and advanced tools than an average programmer, but there are certain tools that you expect every software developer should know, and this list is all about such tools. In this list, I am going to share 10 essential tools, which I believe every programmer or software developer should know and know well. These tools will not only make you a better programmer but also you will be able to do a lot of your day to day tasks quickly and more confidently. Having these tools in your resume also acts like magnet and it will bring more calls from recruiters in 2023.

Top 10 Gift Ideas for Programmers, Software Engineers, and Tech Geeks in 2023

Hello guys, it's that time of the year again when we buy gifts for our loved ones, friends, and colleagues. If you are looking for gift ideas for your programmer friends and colleagues then you have come to the right place. My friend circle has a lot of programmers and non-programmers. When it comes to buying gifts for birthdays, anniversaries, or holidays, I receive a lot of queries from my non-programmer family and friends about what to buy for a programmer? Well, buying a gift is easy but choosing or finding the right gift for someone is really really tough. I have had this experience when it comes to buying gifts for kids. 

How to create Soft and Hard Links in Java? Files + Path + Java NIO Example

Hello guys, not many people know that Java NIO File API also allows you to create links in Java. Many of Java programmer are familiar with ln command in Linux which is used to create soft and hard link but you can also do that using Java File API. Path represents not only files and directories, but links to files and directories, symbolic or otherwise. In fact, the Path class detects and handles links automatically, without requiring you to do anything specific when one is encountered in your application. However, you do have options available on how to handle symbolic links when they occur, and you can also create new links in Java for file systems that support them.

Top 22 Libraries and APIs Java Developer should Learn in 2023 [UPDATED]

One of the traits of a good and experienced Java developer is the extensive knowledge of API, including JDK and third-party libraries. I spent a good deal of time learning API, especially after reading Effective Java 3rd Edition, where Joshua Bloch has advised us to use the existing API for development rather than writing new pieces of code for common stuff. That advice makes sense to me because of the testing exposure these 2nd party libraries get. In this article, I am going to share some of the most useful and essential libraries and APIs, a Java developer should be familiar with. Btw, I am not including frameworks like Spring and Hibernate because they are pretty well known and have specific features.

How to update value for a given key in HashMap - Java 8 getOrDefault() example

Suppose you have a Map of String keys and Integer values e.g. word and their count. You are reading from a file and storing count of each word into an HashMap, if a word already exists you want to update the value by incrementing existing value by 1, how will you do that in Java? Does HashMap provides an update() method to perform such operations? Well, No. HashMap doesn't provide an update method but you can use the same put() method to both insert and update a mapping. If you call the put(key, value) method with a key which already exists in the HashMap then instead of adding a new mapping, it updates the value of existing mapping. For example, if the key "Java" is mapped to the value 1000 in a map then calling put("Java", 1001) will replace the old value with the new value, instead of adding another entry. 

10 Microsoft Azure Cloud Certifications You can Aim in 2023 - Best of Lot

Hello guys, if you are aiming to become an Azure certified professional and looking for top 10 Azure certifications then you have come to the right place. Earlier, I have shared many best AWS certifications and many free courses to learn AWS, GCP, and today I am going to share the top 10 Azure certifications you can aim for in 2023. Cloud computing technology is growing almost faster than any other industry and in fact, the growth has increased by 17% in 2023 compared to the last year, and that because of many facts like the tremendous increase in SaaS companies as well as the power you get compared to what you paid for made a lot of people thinking to use the cloud to store their websites and running their businesses.

Difference between final and effectively final of Java 8? Example Tutorial

If you remember, You can only access a local final variable inside an anonymous class, if you try to access a non-final local variable then compiler will complain, but things has changed a little bit in Java 8 with introduction of lambda expression. Since Java designer are expecting more and more usage of lambda expression they have relaxed that restriction a little bit by introducing a new concept called effectively final, which means now you can access a non-final variable inside anonymous class or lambda expression, provided its not changed after creation i.e. even if its not declared with final modifier but it still like a final variable.  So, concept wise, the variable must still be treated as final variable but the final keyword is not mandatory anymore. This difference between final and effectively final will be more clear with an example of both anonymous class and lambda expression. Let's see that.


Accessing local variable inside Anonymous class in Java

Here is a Java program which shows how to access a local variable inside a Lambda expression and Anonymous class in Java, it wasn't possible before Java 8 but with this new concept called "effectively final" you can access a non-final variable inside Anonymous class now. 

Before Java 8

package beginner;


/**
 * Java Program to demonstrate how to access local variable
 * inside Anonymous class and lambda expression in Java.
 * 
 * @author WINDOWS 10
 *
 */
public class HelloWorldApp {

    public static void main(String... args){

        // count must be final if you want to access it inside
        // anonymous class
        final int count = 10;
        
        Thread t = new Thread(){
            public void run(){
                // Cannot refer to a non-final variable count 
                // inside an inner class defined in a different method
                System.out.println(count);
            }
        };
        
        t.start();
    }
}

In Java 8 :

/**
 * Java Program to demonstrate how to access local variable inside Anonymous
 * class and lambda expression in Java.
 *
 * @author WINDOWS 10
 *
 */
public class Java8Demo {

    public static void main(String... args) {

        // in Java 8, final is not mandatory
        // unless you are not assigning value
        // to the local variable again
        int count = 10;

        Thread t = new Thread() {

            @Override
            public void run() {
                System.out.println(count); // Ok in Java 8

                // local variables referenced from an inner class 
                // must be final or effectively final
                // System.out.println(count++); // not ok
            }
        };

        t.start();
    }
}

You can see that its now possible to access a non-final local variable inside run() method which is inside an Anonymous class in above code. This is possible because variable count has not bee modified since declared, hence its effectively final in Java. 

Difference between final and effectively final of Java 8? Example Tutorial


Accessing local variable inside lambda expression

In this example, we need to use the Runnable interface because java.lang.Thread class is not a functional interface in Java but Runnable is because of SAM rule. It has single abstract method run() which makes it a Functional interface

public class Java8Demo {

    public static void main(String... args) {

        // you can access final or effectively fina variable
        // inside lambda expression.
        int count = 10;

        Runnable r = () -> {
            System.out.println(count); // Ok in Java 8
        };

        Thread t = new Thread(r);
        t.start();
    }
}

You can see that now you can access a non final variable inside anonymous class and lambda expression as long as its treated as final or its effectively final. 

Absence of final keyword means compiler will not prevent you from assigning that variable a new value but it will still prevent if you access such variable inside anonymous class or lambda expression. 

In short, you can only access either a final or effectively final variable inside lambdas and only difference between them is final keyword. It's mandatory to include final keyword for final variable but not for effectively final variable. Also for all other purpose, an effectively final variable is treated as non-final e.g. compiler will not prevent you from assigning a new value to it.

Top 6 Career Options for Experienced Java Developers in 2023 [UPDATED]

Hello guys, If you are an experienced Java programmer who has done a good amount of coding and development, like someone with more than 5 to 8 years of experience, working as a senior Java developer or a technical lead and wondering how to grow to the next level, then you have come to the right place. In this article, I'll share six career options and Jobs experienced developers like you can choose to take your career to the next level. Apart from becoming a project manager, which is what many programmers wanted, there are other more technical and better career opportunities are available now. It's especially great for Programmers with less or no people management skills or who love coding and development and always want to remain hands-on.

How to convert Milliseconds to Minutes and Seconds in Java? TimeUnit Example Tutorial

I used to convert milliseconds to seconds in Java by simply dividing it by 1000, and then into minutes by further dividing it by 60, and then hours by even further dividing by 60 and so on. This works but its not the most elegant way to convert millisecond into hours, minutes, seconds or other time unit. JDK comes with a nice utility class called TimeUnit, which as its name suggest, allow you to convert one time unit into other. So if you have milliseconds e.g. execution time of a method and you want to convert into minutes and seconds to improve readability, you can use TimeUnit.toSeconds() and TimeUnit.toMinutes() methods. 

10 Tools Used by Java Programmers in Day to day life [UPDATED for 2023]

Every trade has its tools, and Java programming is no exception. In fact, good knowledge of tools and mastery of using them saves a lot of time in design, development, testing, debugging, and troubleshooting any production issue. To become a good developer, you must know the right tools for the right jobs. A developer without tools and tricks is like a toothless lion; hence you must devote some time to learning the tools required for your day-to-day job. Many developers think that learning an IDE like Eclipse, NetBeans, or IntelliJ IDEA is enough, but that's just the start of the process. No doubt that IDEs are the most important tool ever created for programmers, but they are not the solution for everything.

10 Things Java Programmers Should Learn in 2023 [UPDATED]

It's 27th December now, and only a few days have left in the year 2022, one of the years which brings joy and freedom after 2 years of lockdown. Now, it's time to look back and retrospect on what you have achieved in 2022 and what you could have done better, despite all the challenges 2022 has thrown to all of us. This will also help you to create your goals for 2023. As a programmer, our biggest challenge is to keep ourselves up-to-date. Technology changes very fast, and you will see a new version of programming language and framework coming to every couple of years. This year has plentiful changes with keeping up-to-date with a new Java version every 6 months, Spring 6.0, Spring Security 6.0, and Spring Boot 3; it's probably the busiest year in terms of changes for Java developers.

How to validate JSON in Java Jackson - Example Tutorial

Similar to XML, you can also validate a JSON. Even if you don't have a schema to validate JSON unlike XML, you can still check if the JSON string is properly formatted or not e.g. it confirms the JSON syntax or not. Any string satisfying JSON syntax standard is considered a valid JSON document. A Valid JSON is important because it ensures interoperation between application JSON related tools.  Although, there are a lot of web based JSON tools available which you help you to validate given JSON String they are only useful for one of usage like you got a JSON String and wondering if it is valid or not but if you are receiving JSON String programmatically from a web service, user or any other source, you definitely want to check if they are valid or not to avoid parsing errors like "Uncaught Syntax error: Unexpected Token"

Difference between -Xms and -Xmx JVM Parameters forJava Heap Memory

Though both -Xms and -Xmx JVM options are used to specify the size of heap memory, main difference between them is that -Xms is used to specify initial heap memory while -Xmx is used to specify the maximum heap memory. The JVM (Java virtual Machine) provides several command line arguments to specify size of different memory areas, also known as generations of Java Heap space, but two of the most useful JVM parameters which specify initial and maximum heap memory is -Xms and -Xmx. When you start JVM by using java command you can specify the maximum heap size with the JVM option -Xmx and a size e.g. java -Xmx1G MainClass will start JVM with maximum heap size of 1 giga bytes. Remember there is no space between -Xmx and size, if you leave space e.g. -Xmx 1024M then JVM will throw invalid heap memory error, so be careful there. 

Top 40 HashMap Questions and Answers for Java Developer Interviews

Hello guys, HashMap and ArrayList is two of the most useful classes from JDK and every Java programmer should be familiar with them. Because of their usefulness, they are also very popular on Java interviews. You will always find a couple of questions on HashMap, ArrayList and its close cousins like Hashtable and ConcurrentHashMap on various Java interviews, ranging from freshers to experienced, junior to senior programmers, and telephonic to face-to-face interviews. To help my readers to better prepare for Java interviews, I have shared some of the essential ArrayList interview questions in my last article and today I am going to share  frequently asked questions on Java HashMap. 

Counting Sort Algorithm in Java? Example Tutorial

Hello guys, in our last article, we looked at the Radix Sort in Java and in this article, we will look at the counting sort in Java. If you are thinking how they are related then let me tell you that both are O(n) sorting algorithms. Yes, its possible to sort in O(n) or linear time. If you are wondering that you have so far only learned that best sorting algorithms are Quick Sort and Merge Sort who sorts an array in O(nLogN) time then you are in for surprise. Yes, there existing O(n) sorting algorithms which are faster than both Quicksort and Merge sort like Radix Sort, Counting Sort, and Bucket Sort but they have their limitation. They are not general purpose sorting algorithm and you can use this to sort only integers and it also depends upon how big is the data set and how many different numbers are in the data set. 

Top 10 Java idioms I wish I'd learned earlier

Hello guys, when your experience grow,  your design, coding, refactoring and testing ability is the one which distinguish you from your competition. It's quite possible that your experience grows but none of these skills grow because you are doing using them frequently in your day job. To be honest, you are not alone. Many people who works in big Investment banks like Citibank, Barclays Capital, UBS, or JP Morgan, spend more times fixing bugs and making config change, deployment and support then actually writing code from scratch or writing unit tests. While we will go with all those skills in coming articles, in this article, I am going to share popular Java coding idioms which can improve your coding skills. 

10 Example of netstat networking command in UNIX and Linux

The netstat command is one of the most essential and useful networking command for Linux users. It is a general, all purpose network information tool which can be used to find out information about current network connections, multicast group membership, routing tables, network interface statistics and many other low-level details of the host's current network configuration. The good knowledge of netstat command is not only important from the troubleshooting perspective but also from security perspective. It gives useful security related information e.g. what network ports are currently "open" on your system and the list of current network connections and their states. 

Top 5 Spring MVC Annotations for RESTful Web Services in Java

Hello guys, Spring framework is one of the most popular Java framework and Spring MVC is probably the most common way to develop web applications in Java, but things just doesn't end there. In the past a couple of years, Spring has become the best way to develop RESTful Web services in Java. Despite numerous RESTful Web Service frameworks in Java world e.g. Restlet, Jersey, RESTEasy, and Apache CFX, Spring MVC has maintained its position as the leading framework for creating RESTful APIs in Java, and there are multiple reason why Spring is the best framework for Java developers for creating RESTful solutions and we will look one of them in this article. 

Difference between 32-bit and 64-bit JVM in Java?

One of the rather new or latest Java interview question is, "What is the difference between 32-bit and 64-bit JVM? or, How do you choose between 32-bit vs 64-bit JVM? or When to use 32-bit or 64-bit JVM? Some interviewer also use this concept to trick candidates by asking what would be the size of int variable in 32-bit and 64-bit Java? As mentioned in 130+ Java questions from last 5 years. Another tricky questions is, does same Java program can run on both 32-bit and 64-bit JVM? Short answer of this question is that Java is platform independent and same Java program will run absolutely fine in both 32-bit and 64-bit JVMThe real difference comes in addressable memory or heap memory. In 32-bit JVM, the theoretical limit of maximum heap size is around 4G but practically you get way less than that e.g. around 1.5 GB in Windows and close to 3 GB in Solaris, see here why it's like that. 

5 Ways to Convert int to String in Java - Example Tutorial

If you have an int variable and wants to convert that into String object e.g. 1 to "1" or 10 to "10" then you have come to right place. In the past I have show explained Enum to Stringhow to convert String to float, String to double, String to int , and String to boolean and in this article, I will show you how to convrt an int to String in Java. And, not one or two but I will show you 4 different ways to convert an int to String in Java, from easy to difficult and from common to unknown. Even though its good to know multiple ways to solve a problem e.g. to perform this conversion, I will also suggest you what is the best way to convert int to String and why?

Top 5 Christmas and New Year Gifts for Programmers and Developers in 2023 [UPDATED]

Hello guys, Season's greetings to everyone. May God bless you with success and whatever you want coming new year. This is festival time and I have a couple of friends asking me what to gift to a programmer friend or colleague? This is a common confusion you face when buying a gift for tech geeks, software engineers, programmers, and web developers. Everybody wants that their gift to be well received and make the person excited and happy. Being a Java programmer myself, I am going to suggest a couple of things which I have recently bought for my programmer friends, colleagues, and relatives. 

6 Ways to convert ArrayList to String in Java - Example Tutorial

Many times we need elements stored in ArrayList in a single String object, but in different format than toString() method of ArrayList provides. At times, you may need them separated by comma, other times by by a tab or new line character. How do you convert your ArrayList to String in Java? Well, even though standard JDK doesn't provide any utility method to do that, there are numerous way to do that out-of-the-box, I mean, without you writing your own method to do that conversion. In the past, I showed you how to convert a Collection to String in Java and in this article, we will take a look at some of them, but beware many of the methods require third party library, which means an extra dependency in your build path. If you don't mind that than you could save lot of time reusing tried and tested code. 

How to use Stream.distinct() to remove duplicates from List in Java? Tutorial

Hello guys, if you are working in Java then you may know that Stream in Java is used to perform certain operations on the objects elements like printing list’s elements, order them, and filter them by defined condition etc. While most of the Java developer only focus on core methods like map, flatMap, filter, and collect you should also explore the whole Stream API as it contains many gems which can help you to write better code, distinct() method from Stream class is one of them. Java Stream Distinct is used to get a stream having non repetitive elements. So it eliminates the redundant data using hashCode() and equals() which is useful to compare objects together.

Top 10 Free JSON Tools for Java and Web Developers

JSON is one of the most popular format of exchanging data between client and server in modern web world. Almost all REST based Web services are now supporting JSON as preferred exchange format because of its competitive advantage over XML in terms of size, flexibility, and speed. With growing adoption of JSON as format to exchange data between systems, the number of tools and libraries have also increased. You will find several libraries to support JSON in various programming languages e.g. Jackson and Gson in Java and JSON Gems in Ruby. There are also several tools available to make working with JSON easy e.g. tools to pretty print JSON response to make it more human readable, tools to validate JSON to make sure it follows JSON syntax and its parseable, tools to create, modify and edit JSON documents etc. 

Java Consumer Functional Interface Example

Hello guys, if you are wondering what is a Consumer functional interface in Java and when and how to use it then you have come come to the right place.  In the last few article, I have explained what is Functional interface and showed example of Predicate Interface and in this article, I will show you how to use Consumer functional Interface in Java.  A Java Consumer is a predefined function interface that has been introduced by java 8. This type of interface accepts only one argument in order to generate the result

Top 20 JSON Interview Questions with Answers for Beginners and Experienced Developers

Hello guys, if you are doing for a web developer interview or a Java web developer interview where you need to write server side application or backend code which uses HTTP to send and receive data then you should prepare about JSON. It's one of the most popular way to exchange data between two systems or between frontend and backend, client and server and most of the top programming language has API to create and parse JSON like Java has Jackson and JavaScript can by default support JSON because its nothing but JavaScript Object Notation.  JSON is also the default data format for REST API  and even GraphQL uses JSON to send request and receive response. 

10 Example of SCP (Secure Copy) Command in Linux

Hello guys, in last few articles I have explained how to use netstat, curl, and lsof command in Linux and in this article, I am going to share how to use SCP command in Linux to copy files and directory from remote host. Similar to SSH, its one of the essential command for any Java Programmer or IT professional as most of the time you will need to transfer data between servers and then you will need either SCP, SFTP, or rSync. The scp is another essential command for Linux user which allows you to copy files and directory from one server to another in a Linux network. It is based upon SSH and behave similarly in terms of authentication and logging but allows you to copy a file or directory from remote server. 

How to send POST Request with JSON Payload using Curl Command in Linux to Test RESTful Web Services?

There are many ways to test your RESTful Web services developed using Spring MVC e.g. you can use RESTAssured for automation testing or you can use Postman to manually test your RESTful Web service but nothing beats the elegant, comfort, power, and simplicity of using curl command to test RESTful web service. It is my favorite tool to test any RESTful web service and I have used in past to test various aspect of Spring REST application e.g. testing headers, testing authentication and authorization, testing different content types like JSON and XML, testing cookies, and testing different HTTP methods to perform CRUD operations. 

Why Programmers Should Learn Mathematics Again?

Hello folks, I have been learning Mathematics again from some time now, ever since I have introduced with Knuth's "Concrete Mathematics" by one of my friend, who I know is a much better programmer than me. I was like, no dude, programmers don't need to learn Mathematics again, whatever I have learned in the past, I have hardly used them. I should learn more about functional programming, Scala, JVM tuning and how to design Scalable, robust and concurrent systems rather than wasting time to learning Maths. But, he insists me to read the book and couple of others on discrete maths whenever you have some free time. So, the book was lying with several others for a couple of months until a fine day when I attracted with its cover. I quickly skim through the book, only to realize that I couldn't understand a bit and got bored in the first reading. After a couple of skimming and reading session, I started to get the hang around the book and realized how good it is. This book contains most of the math we'd need as programmers and it's also very enjoyable math book, but only after a couple of small reading session. 

10 Data Structures Every Programmer Should Learn (with Practice Exercises)

Data Structure and Algorithms are two pillars of Programming. They are also the most important ingredient of a good program and right choice of Data Structure and Algorithms can improve performance drastically, whereas a wrong choice can spoil the party, but do you know what exactly they are? Well, Data Structure are nothing but a way to store data, while Algorithms are ways to operate on that Data. There is a reason why Data Structure and Algorithms are taught in every single Computer Science classes, it doesn't matter whether you are learning Java, C++, Python, JavaScript, Golang, or any other programing language, those data structure and algorithm will be same everywhere. 

50 Linux Command and Operating System Interview Questions Answers for 3 - 5 Years Experienced IT Professionals

Linux is the #1 operating system for hosting real world production application. Most of the real world Java application in big IBs are hosted on RedHat Linux. This makes Linux an extremely important skill for getting a Job. Along with any programming language e.g. Java or C++, you must have good command on Linux and SQL to get a programming job. Btw, Linux is not just limited for development job but it is even more important for support roles and system admin jobs. If you are working in production support then an excellent knowledge of Linux is expected from you, which includes knowing fundamental of Linux e.g. how Linux OS works?, what is kernel or shell?, or what is init process?, as well as good knowledge of various Linux commands to perform day-to-day job, and troubleshoot any production issues. 

[Solved] How to Find maximum Product of a sub-array in Java? Example

Hello guys, if you are asked to find maximum product of a sub-array in Java and you are wondering how to solve this difficult looking coding problem then you have come to the right place. Earlier, I have shared 30 array coding problems, 30 linked list problems, and 10 dynamic programming problems and in this article, we shall be finding the maximum product of a sub-array in java. This problem has a lot to do with arrays. But first, we'll solve the problem then we talk about Array and how it operates. The problem we are to solve here is to find the maximum product of a subarray in Java. We won't just jump to the writing of codes like code monkeys but, it is essential to understand the problem we are solving first, so we can give the best approach in solutions to it. when we say finding the maximum product of a sub-array it means getting the total of a product in an array!

How to implement Strategy Design Pattern in Java? (with Real World Example, Pros and Cons)

Strategy Design pattern is one of most useful versatile pattern, you will often see used in Object Oriented design. This pattern is one of the behavioral pattern mentioned by famous Gang of Four in there design pattern classics Elements of Reusable Design Pattern is Software development. As per definition goes, Strategy pattern allows you to encapsulate a set of algorithms and make them interchangeable. The best thing about Strategy pattern is that it allows you to pass a dynamic code to a method much like Lambda expression. In fact, it was one of the way to achieve same effect prior to Java 8. Also, there are multiple example of Strategy Pattern in JDK itself like Comparator and Comparable are the best example of Strategy Pattern in Java. 

What is SRP or Single Responsibility Principle Example in Java? SOLID Design Pattern Example

Hello guys, if you want to learn about SRP or the Single Responsibility principle and wondering how to write code that follows SRP and what are pros and cons of following this design principle then you have come to the right place. Earlier, I have shared the best object-oriented programming and design courses and books and in this article, I am going to talk about SPR. The Single Responsibility Principles, popularly known as SRP is part of 5 Object-oriented design principles, introduced by Robert C. Martin, popularly known as Uncle Bob. The Single Responsibility principle says that "there should be one reason to change a class". This means a class should do only one thing, and do it perfectly.

How to Rotate Array to Left or Right in Java? Example - LeetCode Solution

Hello guys, rotating an array in Java is a common coding problems which are often used to teach beginners coding as well used during interviews to check candidate's programming and data structure skills. This problem may look easy but its not that easy, especially if you are not coding regular. In order to rotate an array of n elements to the right by kth index, you need to rearrange the item in such a way that the array will start from k + 1the element.  For example, with n = 7 and k = 3, the array [1, 2, 3, 4 ,5, 6, 7] is rotated to [5, 6, 7, 1, 2, 3, 4]. See, it looks like you pick the the 4th element and rotated the array in right direction. The problem becomes even more interesting when interviewer ask you to rotate the array by left or right and in place. Could you do it in-place with O(1) extra space?

Amazon Interview Question - How to Count Negative Numbers in a Sorted Matrix? [Solved]

Hello guys, earlier I shared a list of Google Coding Interview questions, and today, I am going to share with you an interesting coding problem which was asked on Amazon, how to count total negative numbers in a given matrix where rows and columns are sorted in increasing order. Again, I found this coding problem while surfing on the internet, It wasn't actually asked to me or my reader, so I can't vouch that it's actually an Amazon Interview question. Though, I really expect it to be because it's an interesting problem and the optimal solution is not so easy but with the internet, you never know.

Is ByteByteGo Course by Alex Xu worth it for System Design Interview in 2023?

Hello guys, if you are preparing for System Design Interview then you may have come across names like ByteByteGo, Alex Xu or System Design Interview – An insider's guide book by Alex Xu, and if you are wondering what they are or you know about them but thinking whether ByteByteGo is worth it or not? then you have come to the right place. In this article, I will provide my detailed review and opinion on ByteByteGo and his popular System Design Interview  - An Insider's guide book. Though, if you are in hurry and just need a second opinion, I suggest you to go for it. The value Byte Byte Go course provides is much more than the price you pay. It's one of the most comprehensive, up-tp-date, and easy-to-learn System design course I have come across and I highly recommend it to every Programmer and Software Engineer, irrespective of whether you are preparing for System Design Interview or not. It will help you to become a better developer in quick time. 

How to check if a given Tree is a Binary Search Tree in Java? Example Tutorial

Hello guys, if you are preparing for a coding interview then you may know those binary tree problems are not easy to solve on coding interviews and I have seen many candidates struggling to do post-order traversal and checking if a given binary tree is a binary search tree or not. If you want to succeed in the coding interview, you need to prepare well on binary trees in general. One way to prepare better is solving common binary tree coding problems like this one, where you need to find if the given tree is BST or not. There are a lot of things that would tell us if a tree is a binary search tree. But before we get to that, we need to understand what a binary tree is.

How to merge two sorted arrays in Java? Example Tutorial

Hello guys, if you want to learn how to merge two sorted arrays in Java then you have come to the right place. Earlier, I have shown you how to sort arrays in Javaand in this article, I will show you how to merge two sorted arrays in Java. Btw, if you are a complete beginner then Firstly, you need to know what an array is before going about solving this problem about sorted array.  An array is a data structure in Java that holds values of the same type with its length specified right from creation time. This means you can create an integer array like int[] to store integer value. Think of a container, like a crate of eggs or coke, where number of places are fixed and you cannot change once you created it.

Radix sort in Java with Example

Hello guys, in one of the interview I was asked to name any O(n) sorting algorithm. I was shocked because I only knew about QuickSort and Mergesort whose best time is O(NLogN), so I couldn't answer that question. After the interview, the first thing I did was to Google about O(n) sorting algorithm and I was surprised to find that there are many algorithms like Radix Sort and Counting Sort and Bucket Sort which can provide O(n) performance. So, I learn them and wrote articles about them like in previous article I explained about Counting Sort algorithm and in this article, I will explain Radis sort like what it is and how it works. In Radix sort, we are sorting by comparing individual digits from the last one to the first one. In essence, radix sort is like this: sort elements by the last digit. 

Is Java Pass by Value or Pass by Reference? Example

Hello guys, Does Java is pass by value or pass by reference is one of the tricky Java questions mostly asked on both beginner and experienced level Java developer interviews. Before debating whether Java is pass by value or pass by reference lets first clear what is pass by value and what is pass by reference actually means?. This question has its origin in C and C++ where you can pass function parameter either value or memory address, where value is stored (pointer). As per Java specification everything in Java is pass by value whether its primitive value or objects and it does make sense because Java doesn't support pointers or pointer arithmetic, Similarly multiple inheritance and operator overloading is also not supported in Java.

How to iterate over JSONObject in Java to print all key values? Example Tutorial

Hello guys, if you are wondering how to iterate over a JSONObject in Java and print all its fields and values then you have come to the right place. In this article, I will show you how you can print all data from JSONObject in Java. If you know, In json-simple library, one of the top 5 and lightweight JSON library, JSON object is a wrapper class which contains the actual JSON message. In the last article, I have explained how to parse JSON in Java using json-simple library and one question which pops up can we iterate over JSONObject properties? Well, yes, you can iterate over all JSON properties and also get the values from the JSONObject itself. In this article, I'll show you how you can print all keys and value from JSON message using JSONOjbect and Iterator.

How to merge two HashMap in Java 8 - Map.merge() example

Hello guys, if you are wondering how to merge two Map like two HashMap in Java then you have come to the right place. In this tutorial,  I will show you step by step to merge two HashMap in Java. You can merge two Map in Java using the newly added merge() function in Java 8. This allows you to copy values from one map to another to merge both of them. It also provide a lot of flexibility to handle duplicate keys. In the last article, I have shown you how to combine two Map in Java using the putAll() method but there was a problem. If a key is present in both maps, then putAll() overrides the value from the second map, which you may or may not want. 

12 Database SQL Index Interview Questions and Answers for 2 to 5 Years Experienced

A good understanding of Index is very important for any programmer working with database and SQL. It doesn't matter whether you are working as DBA or Application developer, working in Oracle, MySQL, or Microsoft SQL Server or any other database, you must have good understanding of how index works in general. You should know different types of index and their pros and cons, how your database or Query engine chooses indexes and the impact of table scan, index scan, and index seek. You should also be able to build upon your knowledge to optimize your SQL queries as well as troubleshoot a production issue involving long running queries or poor performing queries. This is also a great skill for experience developers with 5 to 6 years of experience under his belt. 

50+ Java Collections and Generics Interview Questions with Answers

Hello guys, If you are preparing for Java interviews then you may know that Java Generics and Collections are two of the most important topics, particularly Generics where some of the trickiest Java questions can be asked. They are also used to gauge your experience and depth of your Java knowledge, hence it's imperative for both beginners and experienced Java programmers to prepare this topic well. While the Java Collection framework provides an implementation of some command data structures like ListSetArray, Hash table, Queue, Stack, PriorityQueue, etc, Generics provides Type safety.

Switch case vs if-else-if vs Polymorphism in Java - Example Tutorial

Hello guys, conditionals like if-else and switch are very important for programming. After all, programming is for decision making and that's where these conditional programming elements help, but you may have heard that excessive use of if-else and switch is bad and is often taught as code smell. So does that mean, should you never use a switch case in Java? In this article, I will share my thoughts about using switch case vs if-else and then whether we can use Polymorphism to replace if-else in Java and Programming, but before that let's see what is a switch constructor in  Java. A switch construct allows you to choose between multiple options depending upon input,

8 ways to Sort List in Java 8 using Lambda Expression + Method Reference - Example Tutorial

Hello guys, as a Java developer we often need to sort List like ArrayList, LinkedList, or CopyOnWriteArrayList and while I have share many articles on sorting a list in Java in both increasing order  and deceasing order as well as sorting ArrayList in a custom order using Comparator, things have changed a lot in Java world, especially after Java 8 when Lambda expression and method reference was first introduced. Now there are more declarative and expressive way to sort a List of object in different order based upon different conditions. Enhancements made on Comparator API has also made comparing and sorting object in Java much easier and I have shown the power of new Comparator API in my earlier article about advanced Java Comparator example. I was particularly impressed with comparing() and thenComparing() as they literally make comparison on multiple condition easier. 

Top 20 IT Support Interview Questions with Answers for 2 to 3 Years Experienced in 2023

Hello guys, if you want to start your career as IT support engineer and  preparing for IT support interview and looking for frequently asked IT support questions from interviews then you have come to the right place. Earlier, I have shared UNIX Interview Questions, SQL Interview Questions as well as Java support engineer interview questions and in this article, I am going to share common IT support questions for 3 to 5 years experienced professionals. If you have worked as IT support engineer then most likely you can answer all of these questions but if you struggle to answer them then I suggest you to first go through a comprehensive IT support course like Google's IT support Professional certification on Coursera to learn and revise key concepts required for IT support engineers. Even beginners can join this course to start their career as IT support engineers. 

Java 8 Predicate Functional Interface Example [Tutorial]

In Java 8, there is a defined functional interface which is called Predicate. The Predicate interface receives an argument and based on specific condition it returns Boolean value. It can be helpful in testing and it’s located in java.util.Function package. This is one of the many pre-defined or built-in functional interface which JDK provides. A couple of important ones are Supplier which can be used to produce a value of T (any object) and Consumer which can consume and project like takes data and print to console. forEach() is a good example of method accepting Consumer interface. Similarly many method accept a Predicate and when they do you can simply pass a lambda which generates a boolean by checking a condition. 

Top 20 Bootstrap Interview Questions Answers for 1 to 3 Years Experienced in 2023

Hello guys, if you are preparing for web designer or web developer interview and looking for bootstrap interview questions, one of the popular CSS framework then you have come to the right place. Earlier,  I have shared HTML 5 Interview Questions and JavaScript Interview Questions and today, I will share 20 common Bootstrap Interview questions for 1 to 3 years experienced web designers and developers. These courses are suitable for both beginners and intermediate developers. If you have used bootstrap and CSS then you can easily answer all of these questions but if you struggle to answer any of these questions then you can always go back and checkout these best Bootstrap courses to learn and revise essential Bootstrap and CSS concepts in quick time. 

Top 15 Cyber Security and Information Security Interview Questions and Answers in 2023

Hello guys, If you are preparing for Cyber Security Engineer interviews or just want to learn more about Cyber Security in 2023 you have come to the right place. Earlier, I have shared best Cyber Security courses and free Cyber Security tutorials and in this article, I am goin to share frequently asked Cyber Security interview questions with answers so that you can revise essential Cyber Security concepts quickly before your interviews. There is no doubt that cybersecurity jobs are the only IT domain that has never experienced a recession yet because companies have a lot of sensitive data in their servers and database so anyone can take advantage of the security weaknesses and exploit them. That's why there is also high demand for Cyber Security experts, but clearing a Cyber Security Job interview is not easy.

Top 20 Flutter Interview Questions and Answers for 1 to 2 Years Experienced

Hello guys, if you are preparing for Flutter and Dart Interview to become a Flutter app developer or land a job as Flutter Application developer and looking for frequently asked Flutter Interview questions with answers then you have come to the right place. Earlier, I have shared React Native Interview Questions and Android Interview Questions and in this article, I am going to share 20 common Flutter Interview Questions with Answers for you to prepare well. These Flutter Interview Questions covers essential Flutter concepts and you can use this list to quickly revise them. If you have used Flutter or worked as Flutter developer then you can easily answer these Flutter Interview Questions but if struggle to answer them then you can always go back and check these best Flutter online courses to revise essential Flutter concepts.