HTML

Top 10 JavaScript Frameworks and Libraries for FullStack Developers in 2021 - Best of Lot

There is no doubt that JavaScript is now the #1 programming language in the world and also the king of web development. If you want to become a web developer who can quickly create websites like you see on the internet, then a good knowledge of JavaScript and various, popular JavaScript web development frameworks is essential for you. These frameworks have completely changed the way people developed web applications a decade ago. After node.js, it's even possible to create a complete web application from front-to-back using just one programming language, JavaScript. That's why it has become the preferred programming language of all Full-stack Web Developers.

Top 10 Open Source Frameworks & Libraries for Java Web Developers [UPDATED]

Java programming language and platform has been fortunate in terms of frameworks, standards, and libraries, I guess which is one of the important reasons for its huge success. Apart from standard frameworks like Swing for desktop GUI application, JavaFX, Servlets and JSP, EJB, and JSF, there are a lot more open-source frameworks and libraries available for Java programmers. These Open source framework, not only helps and speed up development but also enforce to use best practices required to build enterprise Java application and desktop application.

Top 10 Frameworks & Libraries Programmers can Learn in 2021 [UPDATED]

Hello Guys, we are just a few days away from 2021 now, and many of you might have already made your goals about what to learn in 2021, but if you haven't, then you have come to the right place. In this article, I am sharing some of the best frameworks and libraries for web development, mobile app development, and big data, an application developer can learn in 2021. The New Year will be all about the mobile. Machine learning, and next-generation web with a greater focus on big data technologies like Hadoop and Spark, but you can still learn the popular Java and Web development frameworks like React, Node.js, Spring Boot to take your career to the next level. These frameworks are tried and tested and will be here for at least the next 5 years to come.

Difference between first level and second level cache in Hibernate

The main difference between the first level and second level cache in Hibernate is that the first level is maintained at the Session level and accessible only to the Session, while the second level cache is maintained at the SessionFactory level and available to all Sessions. This means, you can use the first level cache to store local data, i.e. the data which is needed by the Session, and you can use the second-level cache to store global data, i.e. something which can be shared across sessions. This is also one of the frequently asked Hibernate Interview questions and accessible in both telephonic rounds as well as on face to face interview, in both fresher and experienced level interviews.

Difference between save(), saveOrUpdate() and persist() in Hibernate Session

The Session interface in Hibernate provides a couple of methods to move an object from a new or transient state to a persistent state e.g. save(), saveOrUpdate(), and persist() are used to store an object into the database, but there are some significant differences between them. The Session.save() method does an INSERT to store the object into the database and it also returns the identifier generated by the database. On the other hand, saveOrUpdate() can be used to reattach a detached object in Hibernate Session i.e. it can do INSERT or UPDATE depending upon whether an object exists in the database or not. 

10 Free Java Programing Books for beginners - download, pdf and HTML

Every Java programmer loves free eBooks on Java, don't you? When I shared my collection of top 10 Java programming books, one of my readers asked me to share some free Java books as well. Doing a quick search on the internet reveals lots of free books, resources, and tutorials to learn Java. I have chosen some of the good Java books, which are FREE, available for download or you can read it online in HTML or PDF format. These books are an excellent resource for any Java beginners, as well as an experienced programmer, and since they are free, it makes absolute sense to have a look on this before buying any other book in Java.

Top 10 Programming Languages to Learn in 2021 [UPDATED]

Hello guys, finally 2020 is coming to an end, and 2021 is approaching fast. This is the time, most of us start making our goals like physical goals, educational goals, and financial goals. As a programmer, one of our goals is to learn new technologies and programming languages, but which languages should you learn? Since acquiring a programming language requires both time and patience, you should learn a language that is worth the effort, I mean., it can reward you a better job and career growth. In this article, I am going to share with you the top 10 programming languages you can learn in 2021 to get a job in your favorite companies like Google, Microsoft, and Facebook.

10 Examples of forEach() method in Java 8

From Java 8 onward, you can iterate over a List or any Collection without using any loop in Java. The new Stream class provides a forEach() method, which can be used to loop over all or selected elements of the list and map. The forEach() method provides several advantages over the traditional for loop e.g. you can execute it in parallel by just using a parallel Stream instead of regular stream. Since you are operating on stream, it also allows you to filter and map elements. Once you are done with filtering and mapping, you can use forEach() to operate over them. You can even use the method reference and lambda expression inside forEach() method, resulting in a more clear and concise code.

Top 5 Spring Framework Books for Java developers (Includes Spring Security and Spring Boot) - Best of lot

Spring framework is one of the most famous structures in the Java world, which used to develop Java application, both core Java and web application. It is also one of the most job oriented skills for Java developer; hence many beginners and intermediate Java programmers try to learn the Spring framework on their own. Though there are some excellent Spring training courses available online, books are still the most popular and preferred way to learn Spring frameworks like Spring core, Spring Boot, Spring MVC, Spring Batch, or Spring Security.  I often receive queries for Spring book recommendations e.g., which Spring book is suitable for beginners, or which Spring book is good for intermediate and advanced developers, which book should I read to learn Spring boot, Spring Cloud, Spring Batch, or Spring security, etc.?

java.lang.ClassNotFoundException: org.Springframework.Web.Context.ContextLoaderListener [Solution]

Problem : You are getting java.lang.ClassNotFoundException : org.Springframework.Web.
Context.ContextLoaderListener in your Spring-based Java Web application.
Cause: This error comes when you are using the Spring MVC framework in your Java Web application and configured org.springframework.web.context.ContextLoaderListener as a listener in your deployment descriptor also known as web.xml, but the JAR which contains this class is not available in the web application's CLASSPATH.

Top 5 Cloud Computing Books for Beginners to Read in 2021

Hello guys, if you want to learn Cloud Computing in 2021 and looking for the best online resources then you have come to the right place. Earlier, I have shared the free cloud computing courses and today, I am going to share the best book to learn Cloud computing in 2021. These books are written by Cloud Computing experts and trusted by thousands of people who want to learn Cloud Computing and public cloud platforms like AWS, GCP, and Microsoft Azure. If you don't know, Cloud computing the field of using a network of remote servers which are powerful computers that work twenty-four hours in a data center somewhere in the world, and you can host your website, data, files on that computer and use it remotely.

Top 20 Hibernate Interview Questions with Answers for Java Programmers

Hibernate is one of the most popular persistent frameworks in the Java world. Hibernate offers an object to relational (ORM) solution which frees Java developers from writing tedious, hard to read, and cluttered JDBC code converting SQL columns into Object properties. Apart from freeing Java developers from writing JDBC and database interaction code, Hibernate also offers the out-of-box solution on caching, proxying, and lazy loading which drastically improves the performance of your Java Web application. Given its importance in the Java Web application development field, Hibernate has become one of the most sought-after skills and goes hand in hand with Spring framework. That's why Spring and Hibernate interview questions are also very popular in Java interviews, particularly for web development positions.

How to Find Square Root of a Number in Java - Example Code

Java program for a square root or a number in Java
How to write a Java program to find the square root of a number is a common Java programming exercise that many institute use in there Java course along with Java program to print Fibonacci series and How to find Armstrong numbers in Java, which we have seen earlier.  Java program for square root is also a popular question during college semester exams and various programming tests. 

Fibonacci Series in Java Using Recursion

Fibonacci series in Java
Write a Java program to print the Fibonacci series up to a given number or create a simple Java program to calculate Fibonacci number is common Java questions on fresher interview and homework. Fibonacci series is also a popular topic on various programming exercises in schools and colleges. Fibonacci series is a series of natural numbers where the next number is equivalent to the sum of the previous two numbers like fn = fn-1 + fn-2. The first two numbers of the Fibonacci series are always 1, 1. In this Java program example for the Fibonacci series, we create a function to calculate Fibonacci number and then print those numbers on Java console.

How to test REST API from Command Line using cURL command in Linux

The curl or cURL command of Linux is a compelling and versatile command which allows you to send sophisticated HTTP request right from your Linux command line window. You can use the cURL command to test your RESTful Web Services by sending GET and POST requests, doing authentication, saving a cookie in the file, etc. The curl command is, in fact, the go-to tool for many Java and Spring developers working in web applications and consuming data from the secured RESTful Web Services. Still, you can also use it to test your simple REST Web APIs without security. I have used it many times to check if our Web service is up or not, or is there any error while accessing those services.

How to java.lang.NoClassDefFoundError: org/springframework/beans/factory/SmartInitializingSingleton in Spring Boot

Problem:
I was trying to run a HelloWorld program using Spring Boot when I got this error:

Exception in thread "main" java.lang.IllegalStateException: Could not evaluate condition on org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration#propertySourcesPlaceholderConfigurer due to internal class not found. This can happen if you are @ComponentScanning a springframework package (e.g. if you put a @ComponentScan in the default package by mistake)
at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:52)
at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:92)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForBeanMethod(ConfigurationClassBeanDefinitionReader.java:174)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:136)

Spring HelloWorld Example in Java using Annotation and Autowiring

Spring framework has gone a couple of releases since I last share the Spring hello world example with XML configuration. In this article, I am going to explain to you how to create a Spring hello world example with Spring 4.2 release and by using Annotation for dependency injection and autowiring. So no more XML files to specify bean dependencies. It's a simple program that shows how you can use the Spring framework to create Services that are loosely coupled. The example will show you the basic concept of dependency injection by creating a simple Java application that greets the user. It's actually a little bit complex version of a simple Helloworld program but if you need decoupling and in-direction you need to accept some level of complexity. That's the price you need to pay to achieve the flexibility in your code.

5 Best Spring Professional Exam Certification Resources (VMware EDU-1202) - Guides, Courses, Books, and Tutorials

Ever since Pivotal has announced that Spring training is not mandatory for becoming a Certified Spring developer (now VMware EDU-1202), more and more experienced Java programmers who have been using Spring for years are preparing for this certification exam. This is obvious because the expensive Spring training, which cost around 32000 USD in the USA and most of the western nations and about 50,000 INR in India, was the biggest hurdle in getting Spring certified and becoming a certified Spring professional. 

Dispatcher Servlet and Spring MVC Request Flow

One of the common interview questions in Spring MVC is, how does the DispatcherServlet process a request in Spring MVC? or What is the role of DispatcherServlet in the Spring MVC framework? This is an excellent question for any Java or Spring web developer because it exposed the candidate's knowledge about Spring MVC architecture and how its main components like Model, View, and Controller.   The answers to this question show how much you know about the Spring MVC framework and its working. 

Top 15 Spring Boot Interview Questions with Answers for Java/JEE Programmers

Hello guys, if you are preparing for your next Java interview and Job description mentioned about Spring framework, then you should also prepare some Spring Boot interview questions to avoid disappointment. The Spring Boot is now the standard way to use Spring framework for Java development and almost all the companies are moving from the traditional way of using Spring Framework to more modern Spring Boot way. Gone are the days, where questions like have you used Spring Boot was asked to the developer. Nowadays interview expects more knowledge of Spring Boot from candidates and there are reasons for it, which we'll explore in this article.

How to Reverse String in Java with or without StringBuffer Example

Reverse String in Java
There are many ways to reverse a given String in Java. For example, you can use rich Java API to quickly reverse the contents of any String object. Java library provides StringBuffer and StringBuilder class with the reverse() method which can be used to reverse String in Java. Since converting between String and StringBuffer or StringBuilder is very easy it's the easiest way available to reverse String in Java. But, in a coding interview, you may not be allowed to use the JDK API methods to solve this problem. That's why, writing a Java program to reverse String in Java without StringBuffer is one of the popular Java String interview questions, which requires you to reverse String by applying logic and by not using API methods.

Merge Sort in Java - Algorithm Example and Tutorial

The merge sort algorithm is a divide and conquers algorithm. In the divide and conquer paradigm, a problem is broken into smaller problems where each small problem still retains all the properties of the larger problem -- except its size. To solve the original problem, each piece is solved individually; then the pieces are merged back together. For example, imagine you have to sort an array of 200 elements using the bubble sort algorithm. Since selection sort takes O(n^2) time, it would take about 40,000-time units to sort the array. Now imagine splitting the array into ten equal pieces and sorting each piece individually still using selection sort. Now it would take 400-time units to sort each piece; for a grand total of 10*400 = 4000.

How to Rotate an Array to Left/Right by a Given Number in Java - Coding Problem

Hello guys, welcome to another post with another array-based coding problem. In the last article, we've learned about finding missing numbers in the array with duplicates, and today we'll solve the problem of rotating an array by left or right by a given number. For example, suppose an integer array {1, 2, 3} is given and it was asked to rate this array to the left by 3 then the result array will look like {2, 3, 1} because it was rotated twice on left. Similarly, if you are asked to rotate the same array twice by right then you'll get {1, 2, 3}, the same array is back. This is an interesting problem and it's quite easy to solve but I have seen many programmers struggle with this one as well. So, a little bit of practice and learning will not hurt.

How to find 2nd, 3rd or 4th element from end in a singly linked list in Java [Solved]

Hello guys, today, I am going to discuss one of the important linked list based coding problem form interviews - how to find the Kth element from the end? This question is also asked as to how do you find the 3rd element from the last of a singly linked list in one pass or write a Java program to find the 5th element form tail of a given linked list in one iteration. In this article, you will learn the programming technique so that you can solve any variant of this problem, I mean the Kth node from the tail problems and some linked list based challenges. The difficulty in this question is that you need to solve the problem in one iteration or one pass. This means you cannot traverse the linked list again. I mean you cannot go till the end then traverse back to the Kth element.

How to Find Repeated Characters in Given String with Count in Java? [Coding Problem Solved]

This is another interesting coding problem or programming exercise for beginner programmers. How do you find repeated or duplicate characters in a given String and their count? You can solve this coding problem in any programming language of your choice like Java, Python, Ruby, or even JavaScript. I'll explain the logic and solution which is easy to implement in the above programming languages and I'll provide code in Java, which is my favorite programming language.  In order to solve this problem, You need to first check if a String contains any duplicate characters or not, and then if it contains any duplicate letters then find out how many times they appear in the given input String.

50+ Java Coding and Programming Problems for Interviews

Hello guys, if you are learning to code and programming, or preparing for a programming job interview and looking for some practice material then you have come to the right place. Earlier, I have shared the best string, array, linked list, and binary tree coding problems and In this article, I am going to share some of the most common Java coding and programming problems for beginners. These are the problems, I have solved myself to learn to program and develop a coding sense and these are the ones which keep coming on Java coding interviews. By going through these coding problems you will not only learn Java but also prepare yourself for Java interviews. 

Is Java a Better Programming Language to Learn Coding?

I often receive questions like which is the first programming language to learn first, Is Java the right programming language to start in 2020,  how good Java is as a first programming language, which is the best programming language for beginners, or shall I start with Java or Python. Well, the answer to all these questions is, Java is one of the most popular programming languages, and there are a lot of reasons to learn Java, starting with Job opportunities to leverage community support. In the context of beginning programming or choosing Java as the first language, my most significant reason is that it's simpler to learn