Sunday, September 10, 2023

Top 10 Puzzles, Riddles, Logical, and Lateral Thinking Questions for Programming Job Interviews

Puzzles, riddles, logical questions, and lateral thinking questions are an integral part of any programming job interviews. I missed to include some puzzles when I shared my list of top 30 programming interview questions earlier, and a couple of my friends requested to share some puzzles as well. These puzzles and lateral thinking questions are mostly collected from various Java programming interviews on Investment banks, but they are equally useful for any programming job interviews. I have seen more puzzles and logical questions at the junior level i.e. 2 to 4 years.

Saturday, September 9, 2023

10 Differences between Java and Groovy Programming - Examples

If you are working in Java, you might have heard about Scala, Groovy, and Closure. Out of these three Groovy seems to be gaining a place in Java projects more rapidly than others. Groovy is a Scripting language but runs on Java virtual machine. Every Java program can run on the Groovy platform. As per the official Groovy website, "Apache Groovy is a powerful, optionally typed and dynamic language, with static typing and static compilation capabilities, for the Java platform aimed at improving developer productivity thanks to a concise, familiar and easy to learn syntax". I think they have highlighted the key capabilities of Groovy very well in that sentence.

Top 20 Tibco Rendezvous and EMS Interview Questions Answers

Hi Guys, in this part of my Tibco Rendezvous tutorial series I am sharing some Tibco RV interview questions and answers most often asked in any TIBCO messaging interview. These are based on fundamental TIBCO concepts and also offer some new ways of learning TIBCO RV or TIBCO Rendezvous technology. Some of the TIBCO Interview questions I have already discussed in my TIBCO command series. Here is the list of TIBCO interview question, I am not putting answer for these interview questions right now but will put together in some other post but these questions are really great in terms of any Tibco messaging interview. 

Monday, September 4, 2023

15 Advanced Microservices Architecture Interview Questions for Experienced Developers

Hello guys, Microservices architecture has become extremely popular in today's technology-driven, quick-paced world because to its scalability, adaptability, and effectiveness. They also goes hand-in-hand with today's popular Cloud computing architecture. They are designed to make best use of Cloud Computing power and that's why more and more companies are switching from Monolithic architecture to Microservices. With increase adoption of Microservices, you will also see more and more questions related to Microservices in Java developer interviews or any other programming job interviews. In fact, Experienced developers frequently encounter difficult interview questions that test their knowledge of microservices and their practical use. To assist developers in preparing for their upcoming interview, we will examine 15 advanced microservices interview questions and provide relevant real-world examples.

Sunday, September 3, 2023

How to Enable logging of SQL statements in Spring Boot? Hibernate + JPA Example Tutorial

Hello guys, if you are a Java developer developing Spring Boot applications, you may need to have proper knowledge of various kinds of errors and also how to overcome those. For example, most of Java developers use JPA in spring boot to make our work easy when managing databases. If you get an error like an internal server error (504 error), you need to go through your backend system and find the error. In many cases, these errors are caused by running invalid SQL or due to error on database. At that time, you often need to know which SQL statements are executed by Hibernate or JPA, or any other database library you are using and if you don't know how to retrieve those SQL statement then debugging and troubleshooting becomes a painful process as you don't have enough data. That's why its important to know how to enable logging of SQL in Spring Boot application. 

How to Modify or Update Data Type of an Existing Column in SQL Server? Example Tutorial

Sometimes we put the wrong data type in a column while creating a table in SQL Server, and later we want to update that column with a different data type, how do we do that? The first things that come to my mind are ALTER TABLE statement, but again I don't remember the exact syntax. Another thing that could go wrong is one ALTER statement working in MySQL may not work in SQL Server or Oracle. To deal with this, I am writing these tutorials to not only remember exact syntax but also about alternatives and other important details.  By the way, while changing the data type of an existing column in a table, there are a couple of things consider like does your table has a huge amount of data? If yes, then it might take a long time to update the table structure, on the other hand in an empty table updating the data type of a column is instantaneous. It would hardly take a couple of milliseconds. 

Spring Boot + MySQL Database example (CRUD) in Java [Tutorial]

Hello guys, if you are a Java developer and wondering how to connect to MySQL database from Spring Boot Java application then you have come to the right place. In this series of Spring Boot tutorials, earlier, I have shared how to use Redis with Spring Boot, a NoSQL database and in this article, I Am going to share how to connect to a relational database like MySQL with Spring Boot. I have also shared tutorials like Spring Boot + MyBatis, Spring Boot + React.js, and Spring Boot +Angular app for full-stack Java developers. If you haven't checked them then you can also check them out along the way. 

How to return different HTTP status code from a Spring MVC controller? Example Tutorial

Hello guys, if you are wondering how to return different HTTP Status codes from a Spring MVC controller then you have come to the right place. You can use @ResponseCode annotation on Spring MVC to send different HTTP codes to the client as part of the HTTP response. If you are developing REST APIs then you can even @RestControler to do that job. This article will demonstrate how to return different HTTP statuses for a Spring MVC controller. Prior to implementation, all we need to understand what is with the HTTP return types and why we need them. Let's have a quick look into this.

Saturday, September 2, 2023

How to define Multiple intercept-url's in Spring Security? Does Order of URLs matter?

Hello guys, one of the frequently asked Spring Security Question is about the order of multiple intercept-urls in Spring security configuration file e.g. applicationContext-security.xml. If you have to define more than one intercept URLS, which order will you define them? Does order or URLs in configuration file even matters? The short answer of this question is, Yes, ordering of intercept URLs in Spring Security configuration file does matter and if you have to define multiple intercept-urls then you define the in a order from most specific to least specific. Why you should that? because Spring security tries to match the URL of every incoming request or outgoing response to the intercept urls in the same order they are declared. 

How to use Named Query SQL in Spring Framework? Example Tutorial

Hello guys, many Java developers don't know that Spring Framework also provides support for NamedQuery where you can pass parameters in a much readable way by using named placeholders than the default placeholder of ? (question mark) which is used with PreparedStatement in Java. If you want to learn Spring JDBC then you have come to the right place. In the past, I have shared the best Spring Framework courses, books, and tutorials to learn Spring Framework and its different features, and in this example, I will show you how to use NamedQuery in Spring Framework. You can then use this technique to write much more readable queries on the Java layer for your application. 

Thursday, August 31, 2023

Top 10 XML Interview Questions and Answers for Beginners

XML Interview questions are very popular in various programming job interviews, including Java interviews for web developers. XML is a mature technology and is often used as a standard for transporting data from one platform to another. XML Interview questions contain questions from various XML technologies like XSLT which is used to transform XML files, XPATH, XQuery, and fundamentals of XML e.g. DTD or Schema. In this article, we will see the top  10 frequently asked XML Interview questions and answers from the above topics. These questions are mostly asked in various Java interviews but they are equally useful in other programming interviews like C, C++, Scala, or any other programming language.

Monday, August 28, 2023

What is CQRS Design Pattern in Microservices? With Examples

In a microservices architecture, it's common to have multiple services that need to interact with the same data store. However, traditional approaches to managing data, such as using a single database for all services, can lead to performance issues and data consistency problems. To address these issues, a design pattern called Command Query Responsibility Segregation (CQRS) has emerged as a popular approach to managing data in microservices. I have been sharing my knowledge about Microservices and Java from past few months and earlier we have covered 10 essential Microservice design patterns and principles and best Microservices courses for Java developers which many of you appreciated. At the same time, a lot of you asked me to go deep down into each of those patterns and explain them with examples.

How to upload/download files in Spring MVC Java web applications? Example Tutorial

Hello guys, if you are wondering how to upload file and download files from a Spring MVC application then you have come to the right place. This is an important functionality for any real-world application and knowing how to upload a file in a Spring application is important for professional Java developers and that's what you will learn in this Spring MVC tutorial. Earlier, I have shared several Spring Boot tutorial like Spring Boot + Microservices, and Spring Boot + REST and even  how to upload files using Servlet and JSP using Apache Commons FileUpload library and In this tutorial, we are going to discuss how to upload and download files using Spring MVC. 

Difference between Spring Boot and Spring Cloud Framework

Hello guys, if you are doing Java development and created Microservices then you may know that Spring Boot and Spring Cloud are two popular Java-based frameworks that are widely used for building enterprise-level applications, particularly Server side backend Java application. Both of these frameworks are developed by the Spring team and offer unique features that make them stand out in the market. While both are used for building scalable, high-performance, and robust Java applications, they serve different purposes and are used in different ways. The aim of this article is to help Java developers understand the differences between Spring Boot and Spring Cloud and make an informed decision on which framework to use for their next project.

How to create a Java Web application using Spring MVC Framework? Example Tutorial

Hello guys, if you are looking for an example to create a Spring MVC application then you have come to the right place. Earlier, I have shared the best courses to learn Spring MVC, Books, and interview questions and In this tutorial, we are going to explain how to create your first MVC application with the spring framework. At present, there are many applications in the world, and developing them is also varies according to the performance, type of the application, and many other factors. However, one of the primary languages used for application development is Java with the model-view-controller (MVC). Here comes the spring framework for application development and will go through an example project to explain this further.