Sunday, January 23, 2022

Difference between CountDownLatch vs CyclicBarrier in Java Multithreading

Difference between CountDownLatch and CyclicBarrier in Java
Both CyclicBarrier and CountDownLatch are used to implement a scenario where one Thread waits for one or more Thread to complete their job before starting processing but there is one difference between CountDownLatch and CyclicBarrier in Java which separates them apart and that is, you can not reuse the same CountDownLatch instance once count reaches to zero and latch is open, on the other hand, CyclicBarrier can be reused by resetting Barrier, Once the barrier is broken.

How to use wait, notify, and notifyAll in Java? Example Tutorial

When should you use the wait() and notify method in Java is one of the many popular questions about the wait and notify methods from Java multithreading interview questions. One of the reasons for its popularity is that still a lot of Java programmers struggle to explain and write code using wait-notify methods.  Many Java developer only knows some facts about the wait and notify methods like that wait() and notify() are defined in the java.lang.Object class or you cannot call wait() without synchronization, which means without a synchronized block or synchronized method but doesn't really know when and how to use them.

Saturday, January 22, 2022

Top 6 Golang Programming Courses for Beginners to Learn in 2022 [UPDATED] - Best of Lot

Hello guys, if you want to learn the Go programming language in 2022 and look for the best Golang online courses, you have come to the right place. Earlier, I shared the best JavaScript Courses, and today, I will share the best online lessons to learn one of the modern programming languages called Go or Golang. This popular, next-generation, highly efficient programming language is created by none other than Google, creator of Angular, Android, Flutter, and Dart, to make their software development process smoother and better. 

Friday, January 21, 2022

Top 3 Niche Programming Languages You can Learn in 2022

 Hello guys, if you are looking for programming languages to gain an edge over the competition then you have come to the right place. In the past, I have shared the best programming language for beginners, the best programming langauge for Data Science, the best programing langauge for web development, Cyber Security, App Development, and game development in this article, I am going to share 3 unique programming langauge which you can learn to distinguish your resume from others. I have chosen a combination of dynamic programming langauge, functional programming langauge, and something which is not very common and makes you a niche developer. 

Producer Consumer Problem with Wait and Notify - Thread Example Tutorial

The Producer-Consumer Problem is a classical concurrency problem and in fact, it is one of the most powerful concurrency design patterns which is used in most multithreaded Java applications. In the last article, I have shown you how to solve the Producer-Consumer problem in Java using blocking Queue but one of my readers emailed me and requested a code example and explanation of solving the Producer-Consumer problem in Java with the wait and notify method as well Since it's often asked as one of the top coding questions in Java. In this Java tutorial, I have put the code example of the wait notify version of the earlier producer-consumer concurrency design pattern. 

How to Create and Start Multiple Threads in Java? - Example Tutorial

Hello guys, Multithreading is one of the biggest strengths of Java, which allows you to divide a task and execute faster by using more than one thread. In order to use multiple threads in Java, you need to first define the task which will be executed by those threads. In order to create those tasks, you can either use the Runnable or Callable interface. If you are just learning Java chose the Runnable interface, it's a simpler one, but if you are familiar with Java multithreading and want to leverage additional features offered by Callable like it can throw an exception and it can also return value, then go ahead and use the Callable interface. Once you have the task ready, you need to create an instance of the Thread class.

Thursday, January 20, 2022

How to Find Lowest Common Ancestor of a Binary Tree in Java? Example Tutorial

To find the lowest common ancestor of a binary tree in java requires that we run through a binary search tree and how it operates.  

What then is a binary search tree? A Binary tree is a data structure in which each node can have at most two children. That is, each node in the binary tree will have data, left child and right child. The first node of the tree is called the Root.

Below is the image of the Binary search tree, the first circle with 15 is called the root node and it has two children, left and right nodes with the values,10 and 20 respectively. Node 10 has two children too with 5 and 13 as values. The left child of node 10 does not have any child but, the right node with value 13 has two children nodes 12 and 14 respectively.

Top 10 Java Interview Questions for 2 to 3 years experience - Answered

Java Interview Questions 2 to 4 years of experience
If you are a Java programmer with 2 to 3 years experience of working in Java and looking for a job change then it's better to know what is expected from 2 to 3 years experienced Java programmer in a typical core Java or J2EE interview. Since 2 to 3 years is not a vast experience and you still fall under beginner to the intermediate category, it's not expected from you to have done profiling, Garbage collection tuning, designing complex Java applications, or even creating concurrent Java design patterns

Java 8 - Map and Reduce Example Tutorial

Hello folks, the map-reduce concept is one of the powerful concepts in computer programming, particularly on functional programming which utilizes the power of distributed and parallel processing to solve a big and heavy problem in a quick time. From Java 8 onwards, Java also got this powerful feature from the functional programming world. Many of the services provided on the internet like Google Search are based on the concept of the map and reduce. In map-reduce, a job is usually split from the input data-set into independent chunks which are processed by the map tasks in a completely parallel manner. The framework then sorts the outputs of the map operation, which are then supplied to the reduce tasks.

Wednesday, January 19, 2022

How to use PreparedStatement in Java - JDBC Example Tutorial

PreparedStatement is used to execute specific queries that are supposed to run repeatedly, for example, SELECT * from Employees WHERE EMP_ID=?. This query can be run multiple times to fetch details of different employees. If you use PreparedStatement like above then the database assists in query preparation, which is faster and more secure. Such kinds of queries are compiled, and their query plans are cached at the database side every time you execute it, you will get a faster response as opposed to using simple queries via Statement object, like SELECT * from Employees WHERE EMP_ID + emp_id.

Is it Possible to add static or private methods in Java interface?

Can you add a static or private method in an interface in Java? or is it possible to add a private or static method in Java interface? or can you add a non-abstract method on an interface in Java? are a couple of popular Java interview questions which often pop up during telephonic interviews. Well, prior to Java 8, it wasn't possible to add non-abstract methods in Java but nowadays you can add non-abstract static, default, and private methods in the Java interface. The static and default methods were supported as part of interface evolution in Java 8 and you can add private methods on an interface from Java 9 onwards.

How to convert Date to LocalDateTime in Java 8 - Example Tutorial

The LocalDateTime class has been introduced in Java 8 to represent both date and time values. It's local, so date and time are always in your local time zone. Since the java.util.Date has been widely used everywhere in many Java applications, you will often find yourself converting java.util.Date to LocalDate, LocalTime, and LocalDateTime classes of the java.time package. Earlier I have shown you how to convert Date to LocalDate and today, I am going to teach you how to convert Date to LocalDateTime in Java 8. The approach is the same. Since the equivalent class of java.util.Date in new Date and Time API in java.time.Instant, we first convert Date to Instance and then create LocalDateTime instance from that Instant using System's default timezone.

Tuesday, January 18, 2022

Top 35 Java String Interview Questions with Answers

Hello Java Programmers, if you are preparing for a Java developer interview and want to refresh your knowledge about  String in Java then you have come to the right place. The  String class and concept is a very important class in Java. There is not a single Java program out there which is not use String objects and that's why it's very important from the interview point of view as well. In this article, I am going to share 35 String-based questions from different Java interviews. It includes questions on java.lang.String class as well as a string as data structure like. some coding questions something like I have shared in my earlier article about 75 Coding questions to Crack any Programming Job interviews

Top 10 Tricky Java interview questions and Answers

What is a tricky question? Well, tricky Java interview questions are those questions that have some surprise element on them. If you try to answer a tricky question with common sense, you will most likely fail because they require some specific knowledge. Most of the tricky Java questions come from confusing concepts like method overloading and overriding, Multi-threading which is really tricky to master character encoding, checked vs unchecked exceptions, and subtle Java programming details like Integer overflow. The most important thing to answer a tricky Java question is attitude and analytical thinking, which helps even if you don't know the answer. 

Monday, January 17, 2022

Right way to check if String is empty in Java with Example

What do most of us Java Programmers do while using String in Java? Check whether String is null or empty right? I am sure you know a couple of ways to test whether String is empty or not, but do you know the right way to do it? When we talk about Strings in Java, we can imagine them as arrays of characters, and they are, but in Java, they also object. An empty Java String is considered as the not null String that contains zero characters, meaning its length is 0. However, a Java String that might only contain the white-space character is not considered empty, it is considered to contain one character and its length is equal to 1. 

Sunday, January 16, 2022

Top 50 JavaScript Interview Questions for Beginners [ 1 to 2 Years Experienced]

Hello guys, you may know that JavaScript is one of the most popular programming languages, having ranking #1 for a couple of years in the StackOverflow survey. There is no doubt that JavaScript is the most popular language or web development. The best thing is that you can use JavaScript to develop both frontend and backend using the same programming language and tech stack. You have so many popular frameworks like React.js, Angular, Node.js, Vue.js to implement sophisticated web applications for different domains. That's why the demand for JavaScript developers is very high, especially full-stack JavaScript developers who can create front-end and back-end applications independently.

Saturday, January 15, 2022

Top 6 Courses to Learn Dynamic Programming for Coding Interviews in 2022 - Best of Lot

Hello guys, if you are preparing for a coding interview but struggling to solve Dynamic programing based coding problems and looking for the best resource to improve your Dynamic programming skill then you have come to the right place. Earlier, I have shared the best coding interview courses as well as common Dynamic programming problems from interviews, and today I am going to share the best online courses to learn Dynamic programming in depth.  Dynamic programming simply means that plain recursion can be optimized when there are repeated calls for some inputs.

Friday, January 14, 2022

Top 5 Courses to Learn MySQL Database in 2022 - Best of Lot

Hello guys, if you want to learn MySQL and SQL in 2022 and looking for the best resources like online courses, tutorials, and books then you have come to the right place. Earlier, I have shared the the best SQL courses, books, and SQL interview questions and today, I am going to share the best online courses to learn MySQL in 2022. As you most probably know, MySQL is one of the big players in the Big Data technological ecosystem. It is one of the most popular databases in the world and has wide-ranging capabilities. It is used in a wide variety of industries, and so every half-decent programmer should at least have a basic understanding of MySQL.

Thursday, January 13, 2022

Top 5 Free & Paid Spring Certification Courses and Practice Tests

Many Java developers don't know that, similar to Oracle's Java certification, there is also a Spring certification program, which certifies yourself for your Spring framework skill. There are three Spring certifications currently available, the Spring Professional certification exam, also known as the Vmware Certified Spring Professional exam (VMware EDU-1202) which certifies on your general knowledge about Spring framework, Spring MVC skill, Spring Boot, Spring Data JPA, Testing with Spring and Spring Boot, and other advanced Spring skills. Earlier, SpringSource provides these certifications, but now they are provided by Vmware, the company behind the Spring framework.

Wednesday, January 12, 2022

Top 5 Spring Boot Courses for Beginners in 2022 [UPDATED] - Best of Lot

Hello guys, if one of your goals is to learn Spring Boot in 2022, and I have started working towards it. As I have talked about my 3 point action plan to learn new technology, the first step is to attend some online courses and start building from that. If you are not sure what is Spring Boot and why should you learn Spring Boot, then let me tell you that it should be the first Java framework you should learn in 2022. The Spring Boot makes it really easy to work with the Spring framework by removing all the starting hurdles concerning setup and configuration. In one word, it makes it possible to write a Spring-based Java application and run them like core Java applications, like from the primary method.

What is objects in JavaScript? Example Tutorial

JavaScript is a dynamically typed programming language. In JavaScript, it is not required to define the data type of a variable but that does not mean JavaScript does not have data types. Data types in JavaScript are divided into two categories - primitive and non-primitive.

Primitive data types such as numbers and strings can hold only a single value. But non-primitive types can hold more than one value. Objects in JavaScript are non-primitive. 

If you have ever done programming, you may be familiar with the concept of objects because objects are one of the most important parts of programming. The reason is simple. Objects can hold multiple values. In this article, we will discuss objects in JavaScript. 

Tuesday, January 11, 2022

5 Best Online Courses to Learn Linux and UNIX in 2022 [UPDATED]

Hello guys, if you want to learn Linux operating systems and command lines and look for the best Linux courses, you have chosen the right place. In the past, I have shared some free Linux courses and bash scripting courses for programmers and developers, and many of you asked for more comprehensive online Linux courses to learn Linux in-depth, which motivates me to write this article. In this article, you will find the best Linux online training classes, online paths, and tutorials from Udemy, Pluralsight, Coursera, and edX, my favorite online learning platforms.  

How to Pass Spring Professional 5.0 Certification (VMware EDU-1202) in 2022 [UPDATED]

Hello guys, if one of your new year goals is to pass the Spring Developer Certification this year and wondering where to start then you have come to the right place. In this, article, I'll tell you how to prepare for Spring Professional v 5.0 certification (VMware EDU-1202)  and useful resources to pass the exam on the first attempt. If you have been self-preparing for Spring Professional 5.0 exam, then you might have struggled with which topics to prepare and which topics to leave out. I often receive questions like does Spring Boot is part of Core Spring certification? Will there be any questions from Spring Security and Spring Data? Does Spring Cloud also part of this exam or not? Unfortunately, there is no detailed, semester syllabus for Vmware's Core Spring certification (VMware EDU-1202) 

Monday, January 10, 2022

5 Best books to Learn JDBC for Java Programmers

The JDBC (Java Database connectivity) is one of the vital API in the Java programming language which allows a Java program to connect to any database, like Oracle, Microsoft SQL Server, MySQL, PostgreSQL, SQL Lite, Sybase or any other relational database. It's an essential API to learn and master for both core Java and Java EE professionals, given the ubiquitous nature of Databases in real-world applications. Despite its importance, many Java developer lacks essential JDBC skills, like they are not familiar with Connection, Statement, connection pool, calling stored procedures, and executing a transaction in JDBC.

Top 5 Free Java Microservices Courses with Spring Boot and RxJava in 2022 - Best of Lot

Hello Java programmers, if you want to learn Microservice architecture and look for free Microservice resources like free online courses, you have come to the right place. Earlier, I have shared the best Microservice courses for Java programmers to build Microservice using Java and the Spring framework, and today, I will share some free courses to learn Microservice in Java using Spring Boot and the Spring Cloud framework. If you don't know, Microservices is a modern architecture that goes along nicely with cloud computing and makes deployment, scaling, and even development easier. 

Top 18 Java Design Pattern Interview Questions Answers for Experienced

Design pattern interview question in Java
Hello guys, if you are preparing for Java interviews and looking for frequently asked design pattern interview questions then you have come to the right place. In the past, I have shared the best courses for Java interviews, and today, I am going to share popular design pattern questions from Java interviews. You can use these questions to both practices and check your knowledge about OOP design patterns. Both OOP and GOF design pattern interview questions are an integral part of any good list of core Java interview questions. Java is a popular Object-oriented programming language and has lots of design patterns and design principles, contributed by many developers and open-source frameworks.

Top 10 RESTful Web Service Interview Questions for Java Developers

REST is an architectural style of developing web services that have become immensely popular in the last couple of years and consequently gained a lot of importance in core Java and Java EE interviews. If you are a Java web developer, then you are most likely to see a couple of questions from web services every time you go for a Java web developer interview. One of the most frequent ones is the difference between REST and SOAP web services, which I have recently answered there, but there are a lot many other good questions I have collected from friends and my readers, which I have not yet published. In this article, I am sharing those questions, mainly based on REST-style web services for your practice and preparation.

How To Check If Two Strings Array are Equivalent in Java? Example Tutorial

Today, we shall be working with arrays, Oh arrays are so pretty! And it’s very simple to learn. Having understood the concept of arrays the goal is to be able to check if two String arrays are equivalent.

What is/are array(s)?

An array is a data structure in java that holds values of the same type with its length specified right from creation time. Think of a container, like the creation of eggs.

Sunday, January 9, 2022

Top 5 Resources to become a Certified Spring Developer Professional in 2022

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 Western nations and about 50,000 INR in India, was the biggest hurdle in getting Spring certified and becoming a certified Spring professional. 

Top 5 Free Courses to crack AWS Solution Architect Certification in 2022 - Best of Lot

A professional certificate speaks louder than a typical CV. Not all certificate holds worth, but some professional certificate does! AWS (Amazon web services) Solution architect associate is one of the most prestigious certifications. There is a lot of demand for AWS certified Solution architects as many companies seek experts who can manage their AWS assets. Amazon also ensures that their partners have certified AWS professionals which further fuels the demand for AWS certification. Given the future of Software development is on the cloud and sooner or later most of the companies will move to the different cloud platforms, particularly AWS gave it's the most popular public cloud, investing your time on acquiring AWS certification can really boost your profile in 2022. 

Saturday, January 8, 2022

10 Spring Framework Annotations Java Developer should learn - Example Tutorial

Hello guys, if you are learning the Spring framework and want to know what are essential Spring annotations you should know then you have come to the right place. Earlier, I have shared the free Core Spring and Spring Boot courses and Spring certification resources for Java developers, and in this article, you will find some of the most common annotations in this article, which is a must for a Java developer to work with Spring. You will also learn what does annotation really does and why should you learn them. There is no doubt that the Spring framework is one of the most popular Java frameworks, and it has made the life of Java developers easy by providing some excellent features in the last 15 years. 

Friday, January 7, 2022

Top 5 Online Courses to Learn Hibernate and Spring Data JPA in 2022 - Best of Lot

Hello Java programmers, if you want to learn Hibernate and Spring Data JPA, two of the leading persistence framework for enterprise Java development, and need the best resources like books, tutorials, and online courses then you have come to the right place. In the last article, I have shared the best Spring framework courses, and best Hibernate booksand today, I am going to share the best online courses to learn both Hibernate and Spring Data JPA in 2022. These are the top-quality courses from popular online learning platforms and sites like Udemy, Pluralsight, and Baeldung and are trusted by thousands of Java developers around the world to learn these essential frameworks for Java developers. 

Top 5 New Features Java Programmers should learn in 2022

Hello Java programmers, If you are wondering which new Java feature you should learn in 2022 then you have come to the right place. Earlier I have shared Java Developer RoadMap and essential Java Development framework and in this article, I am going to share the top 5 new Java features every Java developer should learn in 2022. This includes features like Record which can make creating value classes easier as well as Text Block, var, and many other features to improve your productivity. Java Programming language is changing rapidly. Now there is a new release every six months and it's hard to keep up-to-speed with new Java features. 

Thursday, January 6, 2022

Top 6 Online Courses to Learn Spring Framework in 2022 - Best of Lot

Hello Java developers, if you want to learn Spring Framework and look for the best resources like books, online courses, and tutorials, you have come to the right place. Earlier, I have shared the free Spring Framework courses, best spring framework books, and best Spring Boot courses, and today, I Am going to share the best Spring Framework courses for Java developers. It is one of the world's most popular development frameworks for using enterprise Java. It is used by millions of developers for creating easily testable, reusable, and high-performance code, and it is also one of the essential skills for Java developers. If you are not familiar with the Spring framework, this should be the first thing you should learn in 2022. 

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

Hello Guys, we are in the first week of 2022 now, and many of you might have already made your goals about what to learn in 2022, but if you haven't, then you have come to the right place. In this article, I share some of the best frameworks and libraries for web development, mobile app development, and big data, which an application developer can learn in 2022. The New Year will be all about Mobile App Development, Blockchain, Cloud Computing. Machine learning, and next-generation web with a greater focus on big data technologies like Hadoop and Spark.

Wednesday, January 5, 2022

Top 5 courses to learn Big Data for Beginners in 2022 - Best of Lot

Hello Java programmers, if you want to learn Big Data and related technologies like Apache Hadoop, Spark, Hive, Flume, etc in 2022 and looking for the best resources like books, tutorials, and online courses then you have come to the right place. Earlier, I have shared the best free Big data courses and best courses to learn Spark but a lot of you asked me about the more comprehensive and up-to-date Big data course recommendations. So, I have come up with this list which contains the best-paid courses you can join to learn Big Data in 2022. Although the courses are not free, they are very affordable, particularly Udemy courses which you can get for just $10 on Sales. They are also very comprehensive, up-to-date, and trusted by millions of developers and probably the best resources to learn Big Data online in 2022. 

Tuesday, January 4, 2022

Spring Boot + Thymyleaf Example Tutorial for Java Programmers

Hello guys, if you are looking for a Spring Boot and Thymyleaf example, tutorial, or a project then you have come to the right place. Earlier, I have shared Spring Boot + Reactjs project, and in this tutorial, we will discuss how to create a spring boot and thyme leaf application using the h2 database. So before moving to an example, let's discuss what is thymyleaf? Thymeleaf is a web application development library based on Java. It offers excellent support for providing XHTML/HTML5 in web applications.

Monday, January 3, 2022

Top 10 JavaScript Course and Tutorials for Beginners to Learn in 2022 - Best of Lot

Hello guys, JavaScript is one of the most powerful programming languages, and if you want to learn JavaScript, now is the best time. If you are looking for the best and advanced JavaScript courses, then you have come to the right place. Earlier, I have shared free JavaScript courses, and in this article, I am going to share some of the best courses to learn JavaScript in 2022. I have compiled this list by collecting a lot of recommended JavaScript courses from online learning platforms like Udemy, Coursera, Pluralsight, Educative, CodeCademy, edX, Udacity, and others. This is a decent collection of different types of JavaScript courses from different platforms. While you don't need to join all these courses, joining one or two will be enough. 

Sunday, January 2, 2022

10 Tools Java Developers Should Learn in 2022 - (UPDATED)

Hello folks, we are in the first week of 2022, and many programmers have already started making a good process to their goals for 2022, which is very good, but if you are someone, who is still not sure what to learn in 2022, then you have come to the right place. In the past, I have shared 10 things Java developers to learn in 20221, and last week, I published the top 5 Java Frameworks to learn, but there is one topic that kept coming from my readers.  The question which I have received this week a couple of times from my fellow Java developers and readers is which tools Java programmers should learn in 2022? Or what are some excellent Java tools used in application development? And finally, what should I learn in 2022?

Saturday, January 1, 2022

Top 5 Courses to learn Design Patterns in Java

Hello Java programmers, if you want to learn Design patterns in 2022 and looking for the best resources like books, tutorials, and online courses then you have come to the right place. Earlier, I have shared the best design pattern books, interview questions, and design pattern tutorials and in this article, I am going to share the best design pattern courses for Java developers. A design pattern is the tried and tested solution of classical software problems which is common during software development. Knowing design pattern not only help you to solve those problems quickly but also encouraged you to use tried and tested solution, thus overall improving the quality of the software application you are building.