Preparing for Java and Spring Boot Interview?

Join my Newsletter, its FREE

Friday, June 14, 2024

Review - Is System Design Interview - An Insider's Guide by Alex Xu and Shan Lam worth?

Hello guys, if you are preparing for System design interviews or Software Design Interviews, then you must have come across System Design Interview - An Insider's Guide by Alex Xu and Shan Lam, one of the most popular book on System Design after Designing Data-Intensive Applications by Martin Kleppmann. I first come across Alex Xu on Twitter when one of his image about how HTTPS works went viral. The image was quite detailed and presentable so I start following Alex and then I come across ByteByteGo, his online System design course and his book System Design Interview - An Insider's Guide

Sunday, June 9, 2024

How to show and hide a div using jQuery? show(), hide(), and toggle() function Example

So, you have a div element and you want to show or hide them may be on a click or during page load, how do you do that in jQuery? Well, jQuery provides convenient show() and hide() methods which can show or hide an element, including div. All you need to do is, write a jQuery selector to find the div you want to show or hide and then call jQuery function show() or hide() depending upon your requirement. You can also use the toggle() function to switch between showing and hiding. This method will make element visible if its hidden and vice-versa. To select the div you can use either element, id or class selector but I recommend to use the ID selector because it will work even if you have multiple div in your page. 

Thursday, June 6, 2024

How to version REST API? URL vs Header Versioning? Example Tutorial

Designing a real world, industry standard RESTful API can be a tricky challenge becuase there is no real standard exists. To add into that, there is also a lot of confusing topics e.g. PUT vs POST for creating and updating resources, or using URL or Header for versioning. There are a lot of advices you will find on internet often confusing and advocating one or other alternative, but it ultimately depends upon your own wisdom and use cases to come up with elegant RESTful URIs, which supports both filtering and versioning. There are both pros and cons of URL versioning and Hypermedia version, which we'll discuss in this article, but the most important lesson to learn is that you should always version your REST API

Sunday, June 2, 2024

Top 20 Spring Boot Interview Questions with Answers for Java Developers

Hello Java developers, there is no doubt that the Spring Boot is now the standard way to develop Java application using Spring Framework, and that's why Spring Boot Questions are increasingly becoming popular on Java interviews. In the past, I have shared many Spring MVC interview questions in this blog like the @RestController vs. @Controller, but I haven't got a chance to share any questions on Spring Boot, Spring Cloud, and Microservices. After a couple of personal requests from my readers, I thought to write about, and here comes my list of top 20 Spring Boot interview questions for Java developers.

Friday, May 31, 2024

Top 50 Free Spring Certification Practice Questions Answers for Java Developers

Hello guys, if you are preparing for Spring Professional certification in 2024 and looking for free Practice questions then you have come to the right place. I have an excellent update to share with you from 5th April 2024 onward, you don't need to complete any mandatory training or Spring Pro courses to become eligible for Spring certification, its free like it was before VMware acquired and now you just need to buy voucher to give this exam.  Earlier, I have shared best spring books and courses and today, I am going to share 50+ spring boot practice questions for this certification. To be honest, preparing for IT certification like Oracle's Java certification or VMware's Spring Certification required a lot of hard-work. I have seen many experienced Java developers failing these certifications and losing money and time due to overconfidence and lack of preparation. 

Difference between Setter vs Constructor Injection in Spring

Spring Setter vs. Constructor Injection
Spring supports two types of dependency Injection, using a setter method, e.g. setXXX(), where XXX is a dependency or via a constructor argument. The first way of dependency injection is known as setter injection while later is known as constructor injection. Both approaches of Injecting dependency on Spring bean has there pros and cons, which we will see in this Spring framework article. The difference between Setter Injection and Constructor Injection in Spring is also a popular Spring framework interview question

Thursday, May 30, 2024

How to sort a HashMap in Java 8 by keys and values using Stream and Lambda Expressions

Technically, you cannot sort a HashMap in Java because it doesn't guarantee any order. So, even if you add entries in sorted order they will be placed randomly and you won't be able to iterate over map in sorted order of keys or values. Though, if you want to process keys, values or entries of an HashMap in sorted order, you can get the data from the HashMap and then potentially use a TreeMap (when you want to sort a HashMap by key) or LinkedHashMap (when you want to sort a HashMap by value) to store entries in sorted order. This is also the way, we used to sort HashMap before Java 8. 

Wednesday, May 29, 2024

3 ways to Find First Non Repeated Character in a String - Java Programming Problem Example

Write a Java program to find the first non-repeated character in a String is a common question on coding tests. Since String is a popular topic in various programming interviews, It's better to prepare well with some well-known questions like reversing String using recursion, or checking if a String is a palindrome or not. This question is also in the same league. Before jumping into the solution, let's first understand this question. You need to write a function, which will accept a String and return first non-repeated character, for example in the world "hello", except 'l' all are non-repeated, but 'h' is the first non-repeated character.

Tuesday, May 28, 2024

Can you take Spring Professional Certification without Training Course? [Yes]

Hello guys, I have a big news to share with you now. Since 5th April 2024, you can take Spring certification without any mandatory training or Spring Pro content. So after a flip flop of making training mandatory, Spring certification is free again. Vmware, the company behind Spring, after acquiring Pivotal has reversed the earlier decision announced on 10th May 2017 by Pivotal, the previous owner of Spring Framework, that "Spring Certification Exams are now available for individual purchase, without enrolling in the course". This was one of the most discouraging changes in the Spring certification program since it's launched 10 years back. The cost of Spring certification was the single, biggest obstacle for many experienced Java and Spring developers to get certified for their Spring framework skills.

Top 25 Apache Kafka Interview Questions Answers for Java Developers

Hello, guys if you are preparing for the Java Developer or Apache Kafka interview and looking for frequently asked Apache Kafka interview questions and answers then you have come to the right place. Earlier, I have shared the best Kafka courses and popular interview questions on JavaJMSSpring Boot, and Hibernate and in this article, I Am going to share 20 frequently asked Apache Kafka interview questions with answers. Over the years, Kafka which is developed by Apache Software Foundation has gained popularity because of its immense capability of data processing and become a standard tool for high-speed and reliable messaging. 

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 and books 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.

Monday, May 27, 2024

Top 30 Programming questions asked in Interview - Java C C++ Answers

Programming questions are an integral part of any Java or C++ programmer or software analyst interview. No matter which language you have the expertise it’s expected that you are familiar with the fundamentals of programming and can solve problems without taking the help of API. Programming questions like reversing String using recursion or how to find if Array contains duplicates are some popular examples of programming question in Java. Programming questions present a lot of challenges Especially to Java developers as compared to C++ programmer and I think, One reason for this is powerful Java API; Which has a method for almost every need and you rarely need to write by your own or there are lots of third-party library from Apache, Spring, Google and other open sources.

Review - Is ByteByteGo System Design Interview 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, May 25, 2024

12 Intermediate Database Administrator and Developer Interview Questions on Indexing

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. 

How to Manage Distributed Transaction in Microservices? SAGA and 2 Phase Commit Example Tutorial

Hello guys, managing transaction in a distributed system like Microservices is very challenging and if you don't have a proper approach then you may face production issues and end of with data lose, data corruption and app failure. That's why managing distributed transaction is also an important topic on Microservice interviews. If you are working in Microservices architecture then you may have already heard about the SAGA and 2 Phase Commit etc. and there is also a chance that you may have been asked about those on Java developer interviews. If not, don't worry, in this article, I will tell you about those Microservices design patterns while showing how to manage distributed transactions in Microservices architectures in Java.