Preparing for Java and Spring Boot Interview?

Join my Newsletter, its FREE

Friday, April 26, 2024

What is bean scope in Spring Framework? Example Tutorial

Java classes or POJO which are managed by Spring Framework are called Bean or Spring Beans and Bean scope in Spring framework or Spring MVC is scope for a bean managed by Spring IOC container. Bean scope refers to the lifecycle and visibility of a bean instance in spring container. The scope determines how long the bean instance will live and how it will be shared with the other parts of application. You may know that Spring is a framework that is based on Dependency Injection and Inversion of Control and provides bean management facilities to Java application. In Spring-managed environment bean (Java Classes) are created and wired by the Spring framework. Spring allows you to define how those beans will be created and the scope of the bean is one of those details. Scope are similar to access modifiers in Java which specifies visibility of a particular class. 

Thursday, April 25, 2024

Difference between @RequestMapping and @GetMapping in Spring MVC? Example

Hello Java programmers, if you are wondering what is the difference between @RequestMapping and @GetMapping annotation in Spring MVC and when and how to use them then you have come to the right place. Earlier, I have shared the best Spring MVC courses and books, and In this tutorial, we are going to discuss about Spring MVC and spring boot web services. In there, most of the interviewers asked about the difference between @RequestMapping and @GetMapping annotations in spring applications. Before going to discuss the difference between these annotations, first, understand what is @RequestMapping?, How do we use the @RequestMapping?, What is a request? and types of them.

Wednesday, April 24, 2024

Spring Boot @Transactional Annotation Example - How to Manage Transactions using Spring Framework?

One of the most essential parts of Spring MVC is the @Transactional annotation, which provides support for transaction management and allows developers to concentrate on coding business logic rather than worrying about data integrity in the event of system failures. In other words, @Transactional annotation  simplifies the process of transaction management and it allows you to specify transactional behavior directly within your code, typically at the service layer. You can put @Transactional annotation both at the class level and method level. When you put the @Transacational at the class level, it applies to all the public method of the class but when you put the @Transacational annotation at the method level. It only applies to that method. 

Tuesday, April 23, 2024

4 Ways to take Heap dump in Tomcat and Java and 3 Tools to Analyse .hprof files

The heap dump is a great source of information on identifying memory related issues on Java application e.g. web and application servers like Tomcat, WebLogic, JBoss, WebSphere and IDEs like IntelliJIDEA and Eclipse. When you take heap dump all live objects of heap with their count and other details are written into a huge file (the .hprof file) for analysis. The name and location of heap dump file is provided by command you use to take the heap dump. There are many command line tools in JDK e.g. jmap and jcmd which can be used to take the heap dump in Java. 

Monday, April 22, 2024

Top 50 Java 8 Stream, Lambda, and Functional Programming Interview Questions

Hello guys, if you are preparing for Java interviews and looking for some Java 8 Stream, Lambda Expression, and other Java 8 features then you have come to the right place. Earlier, I have shared 140+ Core Java interview questions, 50 Java Programs from Interviews and 20+ Spring Boot questions and in this article, I am going to share Stream, Lambda expression, and other Java 8 feature-based questions.  Java 8 features are now not remained as good to know features. They have been increasingly adopted by many organizations and most of the new development encourage developers to write code in Java 8 style to take full advantage of massive CPU power available in modern servers like HP 380 Gen 8 servers, also known as G8. 

Sunday, April 21, 2024

Top 3 Design Patterns and Best Practices Java Developers Can Learn From Spring Framework

There is no doubt that the Spring Framework is one of the most popular Java frameworks and makes it really easy to create real-world, enterprise-grade Java applications easy by providing features like dependency injection and inversion of control. But, to be honest, Spring is much more than just another DI and IOC framework. It goes one more level to simplify many Java APIs like JDBC, JMS, Java Mail, etc by providing a useful layer of abstraction. It's much more comfortable to work with JDBC with Spring's JdbcTempalte and other utility classes. They remove most of the friction Java developer faces with respect to executing SQL statements and processing ResultSet to get the Java object they want.

2 Reasons of org.springframework.beans.factory.BeanCreationException: Error creating bean with name [Solution]

The Spring framework is one of the most popular frameworks for developing Java applications. Apart from many goodies, it also provides a DI and IOC container that initializes objects and their dependencies and assembles them together. The Java classes created and maintained by Spring are called Spring bean. At the startup, when the Spring framework initializes the system by creating objects and their dependencies depending upon @Autowired annotation or spring configuration XML file, it throws "org.springframework.beans.factory.BeanCreationException: Error creating a bean with name X" error if it is not able to instantiate a particular Spring bean.

Top 21 Spring Framework and Spring Boot Testing Interview Questions Answers for 2 to 5 Years Experienced

Testing is an important part of Software development but many people don't pay attention to it only to find bugs in the later stages of development that can be easily avoided by unit testing. When it comes to Java and Spring Boot development, we are lucky to have JUnit, Mockito, JsonPath, AssertJ, and some in-built testing facilities on Spring Framework and Spring Boot for our testing needs. Since the advent of DevOps, there is an increased focus on automation testing and that's why unit testing and integration testing has become important topics on Java Interviews and it's essential for Java developers to have in-depth knowledge about how to test a Spring framework and Spring Boot based Java application.

Saturday, April 20, 2024

10 Example of find command in UNIX and Linux

The find command is one of the most versatile commands in UNIX and Linux, and I used it a lot in my day-to-day work. I believe having a good knowledge of find command in UNIX and understanding of its different options and usage will increase your productivity a lot in UNIX based operating systems, e.g. Redhat Linux or Solaris. If you are a QA, support personnel, and your works involve lots of searching text on Linux machine or if you are a Java or C++ programmer and your code resides in UNIX, find command can significantly help you to look for any word inside your source file in the absence of an IDE.

Friday, April 19, 2024

Differences between @RequestParam and @PathVariable annotations in Spring MVC?

The Spring MVC framework, one of the most popular frameworks for developing a web application in Java world also provides several useful annotations to extract data from the incoming request and mapping the request to the controller, like @RequestMapping, @GetMapping, @RestController, @RequestParam, and @PathVariable. Even though both @RequestParam and @PathVariable are used to extract values from the HTTP request, there is a subtle difference between them, which makes them a useful question from a Spring Framework interview and spring certification point of view. We'll examine the subtle difference between @RequestParam and @PathVaraible in this article.

Top 25 Spring Security Interview Questions Answers for Java Developers

Hello guys, Spring Security is one of the most popular security frameworks in the Java world and I strongly believe that every experienced Java developer should learn it. Because of its popularity, there is always some question on Spring Security on Java interviews but there are not enough resources to prepare for that. That's why when  I shared the Spring MVC questions and spring boot interview question last year, a lot of you asked me to share similar interview questions on Spring Security, Spring Cloud, and Microservices. I listen to those requests and have been doing some research since then to write those articles. 

Thursday, April 18, 2024

How Spring MVC Framework works? How HTTP Request is processed?

Hello guys, one of the frequently asked Spring MVC Interview questions is about explaining the flow of web requests i.e. how an HTTP request is processed from start to end. In other words, explaining the flow of requests in Spring MVC. Since many of my readers ask this question time and again, I thought to summarize the flow of request processing in a short article. It all starts with the client, which sends a request to a specific URL. When that request hits the web container like Tomcat it looks into web.xml and finds the Servlet or Filter which is mapped to that particular URL. It the delegate that Servlet or Filter to process the request. Since Spring MVC is built on top of Servlet, this is also the initial flow of requests in any Spring MVC based Java web application.

Friday, April 12, 2024

Top 7 Spring and Hibernate Training Courses for Java JEE Programmers in 2024 - Best of Lot

Spring and Hibernate are two of the hottest and most in-demand web frameworks in the Java world and also two of the most essential skill for any Java programmer to get a job in the web development space. The Spring framework is in around 2004 and established itself as the leading framework to develop Java applications both in core Java and web development areas. The Spring framework comes with a lot of modules to support different kinds of developments like Spring Security to address the security requirements of most web and enterprise Java applications. It supports single sign-on, LDAP authentication, Role-based access control, and much more such essential features. Spring also supports the development of REST services which is now become a standard way to provide web services.

Thursday, April 11, 2024

10 Examples of @RequestMapping Annotation in Spring MVC and REST

The @RequestMapping annotation is one of the most important annotation of Spring MVC which provides mapping of HTTP requests to controller methods, I mean Java methods on Controller class for processing. If you wonder, how Spring handles a particular request and which method from controller class is called for a particular request, answer lies on @RequestMapping annotation. This annotation maps web request to methods on controller class. You can apply @RequestMapping on class or method level of your controller. This is a powerful annotation and give you a lot of option to sophistically map a web request e.g. you can narrow down mapping by using HTTP headers, HTTP methods e.g. PUT or POST, and by using Query parameters.

Top 10 Java Programming Courses for Beginners to Learn Online in 2024 - Best of Lot

If you are a computer science graduate or someone who wants to learn Java and looking for some awesome resources like books, tutorials, and online courses then you have come to the right place. In the past, I have shared some great books, websites, and tutorials to learn Java and in this article, I am going to share some of the best Java courses beginners can join to learn Java in 2024. One of the main problems with learning Java is keeping pace with the increasing number of releases. For example, Java 8 release completely changed how Java is written and after that, we have many Java releases in the form of Java 9Java 10, Java 11, 12, 13, 14, 15, 16, and now Java 17. But the good thing is that the core of Java is still the same and all its releases are backward compatible.

Top 5 Courses to learn Microsoft Azure Cloud in 2024 - Best of Lot

Hello guys, if you want to learn about the Microsoft Azure Cloud Platform, you have come to the right place. In the past, I have shared the best courses to pass Azure FundamentalsAzure Administrator, and Azure Architect certifications. Today, I will share the best online course to learn the Azure platform for Beginners. These are top-quality courses from expert trainers and instructors and are picked from Udemy, Coursera, and edX. You can use these courses to learn Microsoft Azure core services and prepare for different Microsoft Azure certifications like AZ-900, AZ-303, and AZ-20 Azure developer associate certification.

Top 3 Books to Learn Java for C and C++ Programmer?

In the last 2 decades, many Java programmers started programming with C and C++, but the situation is changed now, you have more choices like you can choose Python, or you can even start with Java. It seems Academia prefers Python in the USA and Java in India, but there are still many programmers who know C and C++ and want to learn Java for one or other reasons. I often receive emails from my readers about book recommendation, and recently, a couple of them asked me to suggest the best Java books for C and C++ programmers. I can relate those beginners to myself because I have also gone through the same phase, but those days, the university textbooks are our only source to learn new things. We didn't have broadband, and unlimited access to the Internet and eBooks was not popular at that time, but things have changed.

Wednesday, April 10, 2024

How to limit Concurrent Login Sessions in a Java web application using Spring Security? Example

If you don't know, Spring security can limit the number of sessions a user can have in a Java web application. If you are developing a web application especially a secure web application in Java JEE then you must have come up with the requirement similar to many online banking portals have like only one session per user at a time or no concurrent session per user. If the user tries to open a new session then either an alert is shown or his previous session is closed. Even though you can also implement this functionality without using spring security but with Spring security, it's just a piece of cake with coffee :). 

2 Ways to setup LDAP Active Directory Authentication in Java - Spring Security Example Tutorial

The LDAP authentication is one of the most popular authentication mechanism around the world for enterprise application and Active directory (an LDAP implementation by Microsoft for Windows) is another widely used LDAP server. In many projects, we need to authenticate against active directory using LDAP by credentials provided in the login screen. Sometimes this simple task gets tricky because of various issues faced during implementation and integration and no standard way of doing LDAP authentication in a Java web application. Even though Java provides LDAP support but in this article, I will mostly talk about spring security because of it's my preferred Java framework for authentication, authorization, and security-related stuff.

Entuware or Whizlabs? Which Exam Simulator Should you Buy for Java Certifications (OCAJP, OCPJP, and Others)?

I often receive queries from Java certification aspirants about exam simulators like whether should I go for Whizlabs or Enthuware, which one is better? If I have to buy just one exam simulator, which one would you recommend, Whizlabs or Enthuware? I thought to answer all those questions in a blog post and here you go. To be honest with you both of them are really high-quality test simulators and whichever you buy, you will do well on actual exams. But, as a programmer, I really like to analyze the situation, I compare pros and cons of each of them before I buy one of them. Since I have used both of them in the past I am sure about that in quality, they are neck to neck there, but here are couple of things which you can consider before buying Java certification simulator from Whizlabs or Enthuware?

Monday, April 8, 2024

How HTTP Basic Authentication works in Spring Security? Explained

In the last article, I have taught you how to enable Http basic authentication in Spring security-based Java application, and now we'll go one step further to understand how exactly http basic authentication works in Spring security. If you remember, when you use HTTP Basic for authentication purposes, the client, like a browser or a rest client sends login credentials in the http request header. The header is aptly named "Authorization," and it contains a Base64 encoded string, which is created by concatenating username and password using a colon. For example, if the username is "johnsmith" and the password is "JOHN3214" then they will be concatenated as "johnsmith:JOHN3214" before encoded using base 64 encoding algorithms.

Top 5 Software Development and Project Management Books - Best of Lot, Must Read

Hello guys, if you are looking for Software development and Project management books then you have come to the right place. Earlier, I have shared Software development and project management courses and today I am going to share best books you can read on Software development and project management. You may be wondering, Why software development project managers should read books? Isn't they are experienced enough to become a project manager and handle software development and manage Programmers? A genuine question, but Software management is harder than any other management purely because every Software or Project is different than the previous one. Many other streams of engineering, like Civil or Mechanical, got better in terms of estimation and management with the help of software, but software development is still run on experience.

How to send HTTP request using curl and wget command from Linux and UNIX? Example Tutorial

You can use either curl or wget command to send HTTP requests from UNIX or Linux operating system. Both commands allow you to send GET and POST requests, which means you can also call REST web services.  I have a Java web application, which runs on Linux and exposes WebServices. I was writing a UNIX script to download In some data from that web service when I hit by the question, how do I make an HTTP call from UNIX? What is the UNIX command should I use? If you are also facing the same problem, then you have come to the right ht place. Basically, you can use two UNIX commands to make the HTTP request, wget, and curl.

How to Prepare for Java 8 Certifications - Oracle Java SE 8 Programmer 1 (1Z0-808) and II (1Z0-809)

Today one of my readers asked about what is the latest OCPJP or Oracle Java exams available and is there a Java certification available for Java SE 19 and Java SE 17?. This prompted me to browse through Oracle's certification website. During my casual browsing, I noticed that even though it's almost a year since Java SE 9 was released and 6 months since Java SE 20was released the latest Java certification is still the Java SE 17 certification. I know, you might be thinking about Java SE 11 certification, which is the latest Java certification available, but still many programmers are going for Java 8 because that's what they use in their production environment. 

How to Fix Exception in thread "main" java.util.ConcurrentModificationException in Java? [Solved]

Hello guys, if you are struggling to solve Exception in thread "main" java.util.ConcurrentModificationException" error in Java and wondering why this error comes even if you are not using multiple threads then you have come to the right place. In this tutorial, I will tell you everything about this error like why it comes and how you can solve it. One of the common problems while removing elements from an ArrayList in Java is the ConcurrentModificationException. If you use classical for loop with the index or enhanced for loop and try to remove an element from the ArrayList using remove() method, you will get the ConcurrentModificationException but if you use Iterator's remove method or ListIterator's remove() method, then you won't get this error and be able to remove the element. 

How to fix java.lang.numberformatexception for input string null - Cause and Solution

The java.lang.NumberFormatException comes when you try to parse a non-numeric String to a Number like Short, Integer, Float, Double etc. For example, if you try to convert . "null" to an integer then you will get the NumberFormatException. The error "Exception in thread "main" java.lang.NumberFormatException: For input string: "null" is specifically saying that the String you receive for parsing is not numeric and it's true, "null" is not numeric. Many Java methods which convert String to numeric type like Integer.parseInt() which is used to convert String to int, Double.parseDoble() which convert String to double, and Long.parseLong() which convert String to long throws NumberFormatException to inform that the input String is not numeric.

How to fix java.net.SocketException: Software caused connection abort: recv failed

Out of many client servers related socket errors here is one more interesting socket related error from the Java program, "java.net.SocketException: Software caused connection abort: recv failed". The key point in this error message is "abort" and "recv", which means is someone (client or server) is trying to read from a closed connection. This error usually comes at the client socket end, when the server closed the connection before the client has read the response, but, in general, it can come to an end of the TCP socket, so you must check the log files for both clients and server to find out who is complaining. If the Server is complaining then it's fine and the client has closed the TCP connection may be due to timeout or any RuntimeException at the client end.

Top 7 Online Courses to learn AWS (Amazon Web Services) in 2024 - Best of Lot

With the growth of Cloud computing in recent years, Amazon Web Services (AWS) has become one of the most in-demand technology skills nowadays. This is not a surprise because AWS is the oldest and most significant public cloud provider, and many companies, both big and small, have hosted their solution on AWS.  It has the most extensive collection of Services on the AWS marketplace, which provides individuals and organizations innovative tools and techniques to deploy or migrate their entire infrastructure onto the AWS platform. The demand for AWS Certified Professionals will only grow because migration to the cloud is now the key priority for many organizations.

3 ways to solve java.lang.NoClassDefFoundError in Java J2EE

I know how frustrating is to see "Exception in thread "main" java.lang.NoClassDefFoundError" while running your Java application. This is one of the dreaded problem in Java  which is also a manifestation of NoClassDefFoundError in Java. I have seen it a couple of times and spent quite a lot of time initially to figure out what is wrong, which class is missing etc. The first mistake I did was mingling java.lang.ClassNotfoundException and NoClassDefFoundError, in reality, are totally different, and my second mistake was using the trial and error method to solve this java.lang.NoClassDefFoundError instead of understanding why NoClassDefFoundError is coming, what is the real reason behind NoClassDefFoundError and how to resolve this.

How to Sort an HashMap by values in Java 8 - Example Tutorial

In the last article, I have shown you how to sort a Map in Java 8 by keys, and today, I'll teach you how to sort a Map by values using Java 8 features e.g. lambda expression, method reference, streams, and new methods added into the java.util.Comparator and Map.Entry classes. In order to sort any Map, like HashMap, Hashtable, LinkedHashMap, TreemMap, or even ConcurrentHashMap, you can first get a set of entries by using the entrySet() method and then you can get the stream by calling the stream() method. The entrySet()  method returns a Set which inherit the stream() method from the java.util.Collection class. Once you got the stream, you can just call the sorted() method which can sort all Map.Entry objects available in Stream using a Comparator.

10 Example of lsof commands in Linux and UNIX

It's been a long time since I have written anything on UNIX or Linux commands. Still, today, I'll talk about the lsof command, a utility command every system admin and developers love. The lsof command stands for list open file descriptors, and as the name suggests, it is used to find open files by the process. Since almost everything in UNIX are file, you can use lsof command to find an open regular file, a directory, a symbolic link, a special block file, an NFS mounted file, a socket stream, a shared library, a special character file, a regular pipe, a named pipe, an internet socket, a UNIX domain socket, and many others. I have mostly used it to find all the files opened by a particular process, which I will show you in the next section.

How to Convert a Lambda Expression to Method Reference in Java 8?

If you have been coding in Java 8 then you may know that using method reference in place of lambda expression makes your code more readable, hence it is advised to replace lambda expression with method reference wherever possible. But, the big question is, how do you find whether you can replace a lambda with method reference? Yes, it's not that easy, especially if you have been using Java 8 only for a couple of months and struggling to get the functional programming concepts and idioms sorted in your head. Sometimes, IDEs like IntelliJ IDEA and Eclipse does offer some hints to convert lambda expression to method reference but it does make sense to learn the logic behind it, otherwise, it won't make sense.

Does Oracle's Java Certifications is Good to Start your Career as Java Developer?

Being the author of a Java blog and a certified Java programmer, I receive lots of questions about the usefulness of Java certifications like SCJP, now known as OCJP or OCPJP. Questions like, does getting a Java Certification help to land a job, or does certified Java developers earn more or gets better offers, are quite common to Java developers, especially freshers. In this post, I will try to answer a few of these questions based on my own experience as a Java blogger and a certified Java developer. Well, I did my first Java Certification, SCJP (Sun Certification for Java Programmers) along back when SCJP 1.4 was hot and after scoring 100% on that I did two more Java certifications i.e. my SCWCD (Sun Certification for Web Component Developer) and SCMAD (Sun Certified Mobile Application Developer). 

4 Ways to find Nth highest salary in SQL - Oracle, MSSQL and MySQL

One of the most common SQL interview questions is to find the Nth highest salary of employees, where N could be 2, 3, 4 or anything e.g. find the second highest salary in SQL. Sometimes this question is also twisted as to find the nth minimum salary in SQL. Since many Programmers only know the easy way to solve this problem e.g. by using SQL IN clause, which doesn't scale well, they struggle to write the SQL query when the Interviewer keeps asking about the 4th highest, 5th highest and so on. In order to solve this problem effectively, you need to know about some key concepts like a correlated subquery, window functions like ROW_NUMER(), RANK(), and DENSE_RANK()etc. Once you know the generic logic to solve this problem, you can tackle all those variations by yourself.

Sunday, April 7, 2024

Review - Is Grokking Algorithms book by Aditya Bhargava worth it?

Hello guys, I have read many books on data structures and algorithms like Introduction to Algorithms by Thomas H. Corman and Algorithm design manual by Steve S. Skiena, so when I come to know about this book, I thought, just another book on algorithms, but I was wrong. This is not just another book on algorithms but one of the most interesting books you will ever read on Algorithms and Data structure. It doesn't cover all the data structure and algorithms you see in Computer Science but whatever it covers, it does really well and that's what matters most for beginner programmer or Computer Science students.

Top 5 Books to Learn Docker for Beginners - Best of Lot

Hello guys, if you are a developer or software engineer then you might have heard about Docker and containers. Being an author of a Java and Programming blog, I daily receive a lot of questions about Docker like what is Docker? what is Docker compose, which Docker commands should I learn, what is Docker Hub, How can I migrate my application to Docker and how can I deploy Docker container on AWS, Azure, and GCP. These are also some of the common doubts of programmers across the world. Let's start with What is Docker and why a Programmer should learn Docker? Simply speaking, Docker programming language makes project management and deployment seem easy.

Top 5 Books to Learn Core Java for Beginners - Best of Lot

Hello guys, I have shared a lot of books related to Java and related technologies in the past, like books and online courses to learn Spring, Hibernate, JVM internals Java Performance tuning, Multi-threading, and Concurrency, Design patterns, Data structure, and Algorithms, etc., but I haven't shared books for core Java books for beginners yet. Even though I have mentioned a couple of popular titles every now and then, I really didn't have a complete compilation of essential core Java books for beginners. Since Java is one of the most popular programming languages and very useful for getting a job as a Software developer, it has become a choice of programming language to start learning coding and application development, it makes sense to start well with core Java.

SQL Self Join Example - SQL Query to Find Employees Earning More Than Managers - LeetCode Solution

Hello guys, are you looking for a simple example of how to use SELF JOIN in SQL? If yes, then you have come to the right place. This article will show you how to use Self join in solving interesting SQL problems from LeetCode. Along the way, you will also learn this useful SQL concept. So, what are you waiting for? Let's first check the problem, and then we'll write an SQL query using SELF Join to solve this problem.

Write an SQL Query to Find Employees Earning More Than Managers
The Employee table holds all employees, including their managers. Every employee has an Id, and there is also a column for the manager Id, as shown below:

+----+-------+--------+-----------+
| Id | Name  | Salary | ManagerId |
+----+-------+--------+-----------+
| 1  | Joe   | 70000  | 3         |
| 2  | Henry | 80000  | 4         |
| 3  | Sam   | 60000  | NULL      |
| 4  | Max   | 90000  | NULL      |
+----+-------+--------+-----------+

Given the Employee table, write a SQL query that finds employees who earn more than their managers. For the above table, Joe is the only employee who earns more than his manager because Henry's Manager is Max, who earns 90000, which is more than Henry's salary of 80000.

Difference between row_number(), rank() and dense_rank() window functions in SQL

Though all three are ranking functions in SQL, also known as a window function in Microsoft SQL Server, the difference between rank(), dense_rank(), and row_number() comes when you have ties on ranking i.e. duplicate records. For example, if you are ranking employees by their salaries then what would be the rank of two employees of the same salaries? It depends on which ranking function you are using like row_number, rank, or dense_rank.

Top 8 Courses to Learn Software Architecture for Experienced Programmers in 2024 - Best of Lot

Every Programmer or Software developers wants to grow in their career, but it's not easy, and if you don't pay attention to your job, you will likely to remain in the same position for many years. The growth in the initial few years is generally fast, especially if you are switching companies, and I do recommend that to increase your pay. Though, once you reach the barrier of 5 years, you need to decide which direction you want to move like - people management, product management, or software architecture. For tech guys, who don't want to go on people and product management, software architecture or solution architecture is the final position, which is not surprising. If you want to be close with coding and technical discussions, like to try new technologies, and want to use them in your organization to solve a challenging problem, software architect and solution architect is an excellent position to be in.

Saturday, April 6, 2024

Top 10 Java map() and flatMap() Functional Programming Coding Problems with Solutions

Hello friends, in last a couple of years, I have seen an increase in coding problems where interviewer expect you to solve using functional programming concepts and particularly map() and flatMap(). They do this because they want to know whether you know about these methods or not and whether you can use them in real world scenarios like solving coding problems. I have been collecting such coding problems and today, I am ready with 10 such map and flatMap related coding questions which I am going to share with you. The beauty of these coding interview questions is that you can easily solve them using Stream API and map() and flatMAp() method but if you try to solve them without using Stream API, it could be little tricky.  

Friday, April 5, 2024

Top 10 Free Courses for System Design Interviews in 2024 - Best of Lot

Hello guys, if you are preparing for System Design Interview or just want to improve your Software design skills and looking for best free resources like tutorials and free online courses then you have come to the right place. In the past, I have shared best System design coursesbookswebsites, and popular System design questions but a lot of you asked for free resources and that's why I am going to share best free System design courses I found online. These online System Design training courses are completely free and provides a diverse knowledge about different System design concepts and process. They are also created by experienced trainers and teacher who has gone through the same process and available on trusted online platforms like Udemy and YouTube. You can join one or more of these free System design courses to not only improve your Software design skill but also to prepare for your next System Design Interview

Thursday, April 4, 2024

DesignGuru.io Review - Is Grokking Advanced System Design Interview Course Worth it?

Hello guys, Before I give my review of DesignGuru's Grokking Advanced System Design Interview course, let me tell you a little bit more about this course so that we are on the same page. As you must already know if you have ever gone through for a software engineering interview, system design questions are an integral part of the process. System design plays a very important part as it is considered more important than solving coding problems. And in order to impress your potential employers, you have to be able to show your real design skills and convince them that you are able to work with complex design systems.

Wednesday, April 3, 2024

Top 7 Courses to learn PostgreSQL Database in 2024 - Best of Lot

PostgreSQL is one of the most popular databases after the big three - Oracle, SQL Server, and MySQL. PostgreSQL is commonly known as Postgres and is often referred to as the world's most advanced open source database. If you are looking to learn PostgreSQL in 2024 and looking for some useful resources like books, tutorials, and courses then you have come to the right place. In this article, I am going to share some of the best PostgreSQL online courses for beginners. These courses will cover topics ranging from installations to writing basic queries and retrieving data from tables. you will also explore the logic of SQL Joins, and a few best practices which are essential while working in a real-world, production PostgreSQL database.

How to Crack System Design Interview in 2024? [The Ultimate Guide]

Hello guys, if you are preparing for Software Engineer Interviews, or Software developer interview then you may know that how difficult it is to prepare for System Design interviews given its open ended nature and vastness but at the same time you cannot ignore it. In Software Engineering world, if you are applying for a Senior Engineer / Lead / Architect / or a more senior role, System Design is the most sought-after skill, and hence one of the most important rounds in the whole process. If you mess this up, nothing else would matter. If you get it right though, you’re looking at a raise of at least tens of thousands of dollars annually. 

Tuesday, April 2, 2024

Top 6 Courses to learn Django Framework in 2024 - Best of Lot

Hello folks, If you are learning Python Programming language for Web Development, then you may have heard about the Django framework. Django is one of the popular web development frameworks to create modern web applications using the Python programming language. Django is also the most popular and most mature Python web development framework around. It makes it easier to build better Web apps more quickly and with less code. Building websites with Django is not just smart and efficient, but fun too! Learning Django can also boost your CV as it's a very in-demand skill.

[Udemy Course Review] - Is Java 17 Masterclass: Start Coding in 2024 by Tim Buchalka Worth it?

Hello guys, if you want to learn Java Programming from scratch and looking for the best Java course to join then you have come to the right place. Earlier, I have shared the best Java Programming courses, and today, I am going to review Java Programming Masterclass for Software Developers by Tim Buchalka, one of the highest-rated Java courses from Udemy. This course was also known as The Complete Java Masterclass before and now its known as Java 17 Masterclass: Start Coding in 2024. I have mentioned this course multiple times throughout different articles because it's currently the best course to learn Java. It's both comprehensive and up-to-date and most importantly it's very cost-effective. You can buy this 80-hour comprehensive course for just $10 which is just amazing. 

Monday, April 1, 2024

Educative Review - Is Grokking Modern System Design for Software Engineers and Managers worth it?

Hello guys, System Design Interview is one of the hardest part of any coding or programming job interview and it requires a lot of preparation and knowledge to crack system design interview. You need to know a lot of System design concepts like API Gateway, Load Balancer, Microservices vs Monolithic architecture, SQL vs NoSQL, Horizontal vs Vertical scalability and much. If you are preparing for System design interview then you may have come across that Educative.io has one of best System design courses like this one and Grokking the System Design Interview.  Before I give you my verdict on whether you need to choose Educative's Grokking Modern System Design For Software Engineers And Managers course, let me tell you a little bit about what system design really is.

Top 10 System Design Interview Courses in 2024 - Best of Lot

Hello guys, if you are preparing for System Design Interviews and looking for best resources then you have come to the right place. Earlier, I have shared best System design bookcourses, websites, and System design interview questions and in this article, I am going to share in-depth System design courses from Educative.io, a text based online learning platform for developers and engineers. These are the best online courses to prepare for System Design Interviews in 2024.  If you have been doing Software development then you know that System design is one of the most important skill for developers and managers. System Design and Software Design are not just a tool to pass interviews but it's the way we build modern Software and that's why a good knowledge of System design is required to become a better Software Engineer. 

Sunday, March 31, 2024

Top 8 Courses to learn Reactive Spring Boot and WebFlux in 2024 - Best of Lot

Hello Java programmers, if you want to learn Reactive Programming with Spring Boot and WebFlux and are looking for some online courses to start with, you have come to the right place. Earlier, I have shared the best Spring Courses and best Spring Boot courses, and today, I will share the best online course to learn Reactive Programming with Spring Boot and Web Flux. In recent times, Reactive programming has become very popular. It is a programming paradigm that focuses on an asynchronous, event-driven, non-blocking approach for processing data which paves for writing a next-generation scalable web application in Java.  This means a thorough knowledge of reactive programming is a must for creating scalable web applications, and that's why Java developers need to learn reactive programming. 

ByteByteGo Review - Is ByteByteGo System Design Course by Alex Xu Really Worth it in 2024?

Hello guys, if you are preparing for System Design Interview in 2024 then you may have most likely come across names like ByteByteGo, Alex Xu or System Design Interview - An Insider Guide 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. Yes, ByteByteGo is indeed worth considering for your System Design Interview preparation. because its created by Alex Xu, an expert with FAANG interview experience, the platform offers in-depth coverage of system design topics. The author's use of diagrams to explain concepts in detail enhances the learning experience. 

Saturday, March 30, 2024

Top 15 Udemy Courses to Learn Essential Skills for Programmers in 2024 - Best of Lot

Hello friends, there is no doubt that Udemy is one of the most popular e-learning platforms. It helps more people learn valuable skills like Programming, Coding, Web development, App development, Python, Java, C/C++, Data Science, Machine Learning, Node.js, React.js, JavaScript, and others, which helps them to get a job and career in technology. Even though Udemy has all kinds of courses, from Programming to Photography, from Music to Digital Media, in this article, we have compiled a list of the best Udemy Courses and certifications for Programmers and Developers.

Friday, March 29, 2024

Top 10 Courses to Learn Spring Boot in 2024 for Java Developers - Best of Lot

Hello guys, if you are interested in learning Spring Boot and looking for some excellent resources, e.g. books, tutorials, and online courses to start with, then you have come to the right place. Earlier I have shared some great books to learn Spring Framework, including Spring Boot (see), and today, I'll share some of the best online Spring Boot courses you can join to learn Spring Boot by yourself. In the past, I was a big fan of learning from a book, but online courses have changed that completely. Now I prefer to start with an online course, like Spring Boot 3, Spring 6 & Hibernate for Beginners, and then move on to a book like Spring Boot in Action for more comprehensive learning. Anyway, before going through those Spring Boot courses, let's first revise what Spring Boot is, and its benefits, and why you should learn it.

Wednesday, March 27, 2024

How to Compare Date in SQL Server Query? Finding All Rows Between Two Dates

It's tricky to use dates in the SQL server query, especially if you don't have good knowledge of how DateTime type works in the SQL server. For example, one of the frequently asked SQL queries on the interview is to "select all rows where the date is 20151007?" How would you do that? Does the following SQL Query will work correctly

select * from table where date = '20151007'

It may or may not, it entirely depends on upon data in your table. When you only provide date part of a DateTime variable, it uses '00:00:00.000' for the time part.

Tuesday, March 26, 2024

Top 50 Java Programs from Coding Interviews

Coding is an integral part of any programming job interviews, and Java development interviews are no exception. I would even suggest you should never hire anyone without testing their coding skill, coding is also an art, and more often than a good code is an excellent developer as well. If you look at tech giants like Amazon, Facebook, and Google they thoroughly test the coding skill of any developer they hire, notably Amazon who first send online coding exercises to filter Java programmers who can code. This online test usually gives you requirements and ask you to write a program in a limited time, usually 2 to 3 hours. The application should meet the output provided by the exercise itself. These type of tasks are very tough to crack if you don't have excellent coding skill.

Monday, March 18, 2024

What is N+1 SELECT Problem in Hibernate? Strategies to avoid this?

In some cases while using Hibernate for object-relational mapping, you will encounter the N+ 1 select problem. That is, Hibernate will execute (n+1) queries to populate a list of records of size n, I mean 5 SELECT queries will be required to populate 4 records. This happens when each object contains reference of another object which needs to be populated. For example, suppose you have list of authors and you want to print out title of books written by each other. A naive ORM will first do a SELECT query to load all authors and then execute another N SELECT query to load book for each author. That's your N + 1 SELECT problem because it involves N+1 database roundtrips'. There are some mechanisms suggested by Hibernate that can be used to mitigate this risk e.g. EAGER fetching mode.

Sunday, March 17, 2024

Top 22 Apache Tomcat Interview Questions Answers for Java JEE Developers

The Apache Tomcat is one of the most popular web server used to deploy Java web application comprising HTML, JavaScript, Servlet and JSP. If you have ever worked in a Java web application you might have found yourself using Tomcat everywhere, from test environment to production. It is the defacto standard for deploying Java Web applications without EJB because using application server like WebSphere or WebLogic is both costly and superfluous for such web application. As a Java developer, working in Java and Spring based web applications, you should know some basic and advanced detail of Tomcat server to efficiently support your Java web app and troubleshoot any issue arising on request processing. 

Thursday, March 14, 2024

Top 10 HTTP Status Code Every RESTful web Service Developer Should know

A good knowledge of HTTP protocol is must for a RESTful Web Service developer because REST uses HTTP principles and a good portion of its popularity is due to HTTP itself. One of the important part of HTTP is the status code, which gives useful information related to client request. They are also known as HTTP response code because they are sent in header on HTTP response by Server to indicate what happened with client's request. The status codes ranges from 100 to 500 but not all of them are valid and useful. Instead the first number e.g. 1xx or 2xxx denotes the class of status codes. 

Saturday, March 9, 2024

10 Example of Gson in Java - JSON tutorial

The Gson library is a gift from Google to Java developers. It provides the simplest but powerful mechanism to deal with JSON documents in Java. By using Gson library, you can parse JSON String to generate Java objects, serialize a Java object to create a JSON document. You can even pretty print JSON String by setting some option to the Gson class, which is the main helper class to interact with Gson library. It also provides mechanism to deal with nulls e.g. you can include null on JSON String or you can omit them. By default Gson print JSON in compact format where null fields are not exported to JSON document but null within array and list are exported. 

Thursday, March 7, 2024

Difference between Servlet and Filter in Java

Servlet and Filter are two of the essential concepts defined in Servlet specification. They are core of any web application because most of the request will pass through them. This is why they are also very popular on Java Web developer interviews. What is the difference between a Servlet and a Filter is one of the most common and interesting interview question related to Servlet. If you can explain the difference clearly, you improve your chance of hiring a lot. In order to understand and explain the difference, you must understand what is the purpose of Servlet and Filter, How they work and how they are used in various web applications. 

Sunday, March 3, 2024

Top 27 Gson Interview Questions with Answers for Java Developers

Hello guys, parsing and creating JSON is a very common task in any Java application, particularly spring based application and that's why its important for a Java developer to not just understand the JSON format but also to be familiar with the important JSON parsing libraries in Java like Gson and Jackson. It's not just important for your day to day Java development work but also for interviews as there is a increased focus on checking if candidate is familiar with key JSON libraries like Jackson or Gson or not. Since I shared Java interview questions on core Java topics like concurrency, abstract class, static, and final modifier, a lot of my reader asked me to share JSON related interview questions as well. 

Friday, March 1, 2024

Difference between known_hosts and authorized_keys file in SSH - Linux

If you have used SSH to login into remote host in Linux, you might have come across these two files stored under the .ssh directory in your home directory e.g. ~/.ssh. Both files are used in the login process for authentication, but the main difference between known_hosts and authorized_keys files are that, known_host is used for server authentication, while authorized_keys are used for client or user authentication. SSH allows login using both password and private keys, you might have heard about trusted SSH connection between two host to download files without entering password, this is achieved using public and private keys. 

2 ways to Split String with Dot (.) in Java using Regular Expression? Examples

You can use the split() method of java.lang.String class to split a string based on the dot. Unlike comma, colon, or whitespace, a dot is not a common delimiter to join String, and that's why beginner often struggles to split a String by dot. One more reason for this struggle is the dot being a special character in the regular expression. If you want to split String on the dot you need to escape dot as \\. instead of just passing "." to the split() method. Alternatively, you can also use the regular expression [.] to split the String by a dot in Java. The dot is mostly used to get the file extension as shown in our example.

Thursday, February 29, 2024

What is the ContextLoaderListener in Spring MVC? What does it do?

The ContextLoaderListener is one of the important component of Spring MVC framework. It is like any listener defined by Servlet specification and specified in web.xml using <listener> tag. It is loaded when Spring MVC based web application is deployed in any Servlet container e.g. Tomcat. The ContextLoaderLister of Spring MVC is responsible for loading root ApplicationContext for Spring. The application context is the place where Spring bean lives. If you need reference to a Spring bean either its auto-wired or injected by framework or you can get it directly from application context. In Spring MVC based web application, there can be multiple application context e.g. root application context and context local to each DispatcherServlet.

Thursday, February 15, 2024

Review - Is Grokking the System Design interview Course on DesignGuru Worth it?

Hello guys,  we are here again today for another exciting topic to discuss. But today, we will not discuss something related to Java or any other language or spring boot. Today, we will discuss something that is immensely practical and has the potential to land you very high-paying jobs. Today we are going to review a course that focuses on System Design! System Design is crucial for coding interviews! And it's also one of the most challenging topics to master. I have shared the best System design courses for coding interviews in the past. Today, I will review one of the top system design courses for technical discussions, Grokking the System Design Interview by Design Gurus.

Tuesday, February 13, 2024

Top 5 React and Redux Courses to Learn Online in 2024 - Best of Lot

If you are a Web developer or someone passionate about web development and looking for some awesome courses to learn React or React JS, a popular JavaScript framework to develop a component-based user interface then you have come to the right place. Facebook's React library has taken the front-end development world by storm. More and more people have started using React even in favor of Google's Angular, another popular front-end development framework. Well, I am not going into the classic debate of Angular vs React as both the framework has their own advantage and disadvantage but if you have chosen to learn React, you have made the right decision.

Monday, February 12, 2024

Top 10 System Design Courses for Beginners and Experienced Developers in 2024 - Best of Lot

Hello guys, if you are preparing for System design interview and looking for best online courses to learn essential System design concepts like load balancing, API Gateway, scalability, Microservices architecture as well as learn how to solve popular System design questions like how to design YouTube, WhatsApp, Parking Lot, Library System as well when to use NoSQL and SQL then you have come to the right place.  In the past, I have shared best System Design Books, Free System design courses,  System design prep guide, and System Interview Questions and in this article, I am going to share best System Design Courses for beginners and experienced Software Engineer to level up their System Design skills in 2024. 

Thursday, February 1, 2024

Top 6 Object Oriented Programming and Design Courses for Java Programmers in 2024 - Best of Lot

There is no doubt that Object-oriented programming is a pillar of software development and one of the reasons for the massive success of Java. Good knowledge of Object-oriented programming helps you to create better software. It also allows you to communicate your ideas better with your team members and fellow programmers. Despite being such an important technology, it's difficult to find programmers who understand OOP well. Many programmers just think that OOP is nothing more than Abstraction, Inheritance, Encapsulation, and Polymorphism, without genuinely understanding these concepts and mastering them.

Top 5 Courses to learn D3.js for Data Visualization with JavaScript in 2024 - Best of Lot

If you have done any Data visualization work then you might have heard about D3 - one of the excellent JavaScript libraries, which allows you to create beautiful interactive data visualization for the web. It's prevalent among Data Scientists and Data Analysts who often need these visualizations and charts to present data insights to stakeholders and business people. If you are not familiar with D3, no need to worry because, In this article, I am going to share some of the awesome courses to learn D3 in 2024. These courses teach you the basics of data visualization with D3 by binding data to a web page’s elements and customizing the elements based on that very data. You will also learn how to build different kinds of charts like Bar charts, Pie charts, Mind maps, etc using D3.js

Wednesday, January 31, 2024

Difference between List of ? (any type) and List of Object in Java Generics

No doubt that Generics is one of the most confusing topics in Java and you can easily forget concepts and rules, especially, if you don't code Java everyday. For example, both List<?> and List<Object> looks similar but there is a subtle difference between them, the List<?> is basically a list of any type, you can assign a list of String i.e. List<String> or list of Integer i.e. List<Integer> to it. You see the point, it uses the unbounded wildcard <?>, which means any type. It provides it the much needed Polymorphism require while writing Generic methods. Basically, if your method has a type List<?> which means you can pass any type of List to it but remember the type is unknown, until you assign it i.e. List<?> myList = new List<String>(). 

Top 8 Udemy Courses to Learn System Design and Software Architecture in 2024 - Best of Lot

Hello guys, if you want to learn Software Architecture and System design in 2024 and looking for best resources then you will be happy to know that  I am going to share  8 best Udemy courses to learn Software architecture and System design for 2024. if you are preparing for technical interviews for Software Engineering job then you may be aware of  Software Design or System design. It is one of the most important but at the same time very tough topic to master and many programmers even experienced developer struggle to solve System design problems during interview, particularly while interviewing with top tech companies like Google, Meta, Amazon, Apple, Microsoft, Netflix etc, popularly known as FAANG (now MAANG) since Facebook is now Meta. If you are also preparing for programming job interview and looking for best System design and Software design resources then you are at the right place. 

Monday, January 29, 2024

How to Crack Java Programming Interviews in 2024? Topics, Courses, Books, and Questions

Java Interviews are a little bit different than traditional programming interviews on tech giants and product-based companies like Google, Amazon, Microsoft, or Facebook. First, even though it has questions from Data Structures and Algorithms like String or Array, you can still manage to clear Java interviews if you are not an expert on them. The questions are a little bit easier and more practical than those companies. Another essential thing about Java interviews are questions based upon Java programming language and JDK API. Since Java is also an Object-oriented programming language, you will find lots of OOP questions there.

Top 9 Websites to Learn System Design and Software Design in 2024 - Best of Lot

Hello guys, if you are preparing for System design Interview and looking for best resources to master Software design and System design then you have come to the right place. Earlier, I have shred best System Courses, Books, System Design Interview Guide, Cheat Sheets, and System Interview Questions and in this article, I am going to share best places to learn System design in 2024. Before we get to the best websites that will teach you everything you need to know about system design, let me tell you a little bit about what it really is. Systems design is basically the process of defining elements of a system including modules, architecture, components, interface, and data for a system based on a specific set of requirements. It can also refer to the process of defining, developing, and designing systems. These designs have to satisfy the specific needs of a company or an organization.

Sunday, January 28, 2024

Top 5 Free Courses to Learn Kubernetes for Developers and DevOps Engineers in 2024 - Best of Lot

Hello guys, DevOps is becoming an essential skill in today's Programming and Software Development world and Kubernetes is an important concept and tool for DevOps engineers. It takes container-based deployment to another level and allows you to manage it on the scale. You can use Kubernetes to scale your container environment or let Kubernetes do all the work for you by leveraging its auto-scaling feature. Many DevOps beginners think that Docker and Kubernetes are the same but they are not. Docker provides a container to deploy your application and commands to interact with those but container but Kubernetes is actually a container management technology, which decides how many containers are needed and deal with other management aspects.

Top 5 Books to Learn JavaScript in depth - Best of Lot, Must Read

JavaScript is the most popular programming language in Web, way ahead of popular ones like Perl, Ruby, and Python. It is also one of the essential skills for any Web developer. It is even true for Java developers. If you have JavaScript in your resume or LinkedIn profile, you will likely receive many Job opportunities. Everybody wants polyglots, programmers who know multiple programming languages because most of the real-world projects are developed with multiple technologies, you will always found some component is written in Java, some in C++, then you have JSP, Server, jQuery, JavaScript, etc. for web pages and so on. In short, it's essential to learn JavaScript in today's competitive world.

Saturday, January 27, 2024

Top 5 Courses to Learn Hibernate and JPA in 2024 - Best of Lot

Hibernate is one of the essential frameworks for Java and Java EE or JEE programmers, especially if you are working on the server-side of a Java Web development project. It's an ORM tool or a framework that allows you to deal with only objects while Hibernate takes care of your data on your behalf. For example, instead of writing classes with SQL to load, save, and update data using the DAO design pattern, you can simply use the Hibernate framework in your project. It will allow you to deal with just objects while it will load, save, and update data in the background. It's also one of the top Java frameworks in my list of top 10 Java frameworks Programmers can learn.

Top 5 Courses to Learn IntelliJIDEA and Android Studio IDE for Java and Kotlin Programmers in 2024 [Best & FREE]

There is no doubt that IntelliJ IDEA is THE best IDE for Java development, even though Eclipse may still be probably used by more people because it's FREE, IntelliJ IDEA is the most feature-rich and complete IDE. The Android Studio, which is the official IDE for Android development in Java, is also based upon IntelliJ IDEA, which further cement its place as the IDE Java developer should learn. The only thing which stops many other Java developers and me from moving from IntelliJ IDEA in the past was the lack of resources. Since Eclipse was free from the start, there are tons of resources, like books, courses, and tutorials are available. There are also a lot of resources to learn productivity tips, like keyboard shortcuts, and debugging techniques, but there were not many for IntelliJ IDEA.

Top 7 Python Books to Learn Data Science and Machine Learning in 2024 - Best of Lot

While there are many online courses to learn Python for Machine learning and Data science, books are still the best way for in-depth learning and significantly improving your knowledge. Python is a universal language that is used by both data engineers and data scientists and probably the most popular programming language, as well. All the Data Scientists I have spoken to, and many in my friend circle just love Python, mainly because it can automate all the tedious operational work that data engineers need to do. To make the deal even sweeter, Python also has algorithms, analytics, and data visualization libraries like Matplotlib, which is an essential data scientist.

Top 10 Coursera Courses and Certifications to Learn Web Development in 2024 - Best of Lot

Hello guys, If someone asked me 10 years ago about how to learn web development and get a job I would more likely say that you have to go to college and get your Bachelor’s degree and then try to get a job or internship. In short, it was only possible to become a web developer by spending years on education and thousands of dollars, now the internet has changed the game nowadays. These days many online platforms like CourseraUdemyPluralsight, CodeCademy, and Educative appeared to the world allowing people to take online training courses in almost any industry and web development is one of them. 

Friday, January 26, 2024

Top 10 Coursera Certifications, Courses, and Specializations to Learn Essential Skills in 2024 - Best of Lot

Hello guys, if you are looking for the best Coursera courses, certification, and specialization to join in 2024 then you have come to the right place. In the last few articles I have shared the best Coursera courses to learn PythonSoftware Development, and Cloud Computing, and today, I will share the best Coursera courses, specializations, and certifications you can join in 2024. Taking online courses and certifications have become mandatory in order to have a professional and successful career and the process is similar to a college education just by staying at your home taking classes watching videos and passing the quizzes and done you are now officially certified and when it comes to the best platform to learn online no one can compete with Coursera.