HTML

Top 15 Java 8 Stream and Functional Programming Interview Questions Answers

The JDK 8 release has changed the way we write Java. With new functional programming idioms and a powerful Stream API, most of the new Java code is written in a functional style. This also means that Stream and Functional programming related questions are increasing on Java interviews. If you are not familiar with Java 8 changes, then it's difficult to crack a Java interview nowadays. Though it's not stated anywhere, most of the companies, particularly Investment banks like Barclays, Citi, and Goldman Sachs, now expect Java developers to know at least Java 8, which is also good, right? Java 11 is already out, and we are looking forward to Java 12 in a couple of months, it makes sense to know at least Java 8 changes.

Top 12 Java Thread, Concurrency and Multithreading Interview Questions For experienced Programmers

Java concurrency and thread interview questions answers
Multithreading is an important feature of Java programming language, which means threads are also an important part of any Java interview. It's true and in fact at beginners and freshers level Thread interview questions in Java are one of most difficult to answer. One reason for interview question related to multithreading and concurrency being difficult is confusion around how multiple threads works together and second is threads are genuinely a complicated topic to understand and use correctly.

Top 5 Free and Best Spring Core Professional Certification Courses, Practice Questions and Online Mock Exams - VMware EDU-1202

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, Spring Professional certification exam, which certifies on your general knowledge about Spring framework, Spring Web Application Developer exam, which confirms you about your Spring MVC skill and Spring Enterprise Integration Specialist certification exam, which is for advanced Spring Integration skill. Earlier, SpringSource provides these certifications, but now they are provided by Pivotal, the company behind the Spring framework.

Top 22 Array Concepts Interview Questions Answers in Java

An array is one of the fundamental data structures and most of the other advanced data structures like list, hash tables are built using arrays.  Good knowledge of fundamental data structures like the array, linked list, a binary tree is not just essential for writing better code but also doing well on Programming Job interviews. Array-based questions are quite popular in Java interviews. There are two types of questions you will find, first which are based upon array implementation in Java and second which are based upon how to use an array data structure to solve some coding problems. The first type of question is quite popular in the telephonic round of Java interview and second is usually asked on written tests and face-to-face interviews.

How to Schedule Spring 5.0 Core Professional Certification Exam (VMware EDU-1202) Online?

Hello guys, even since Pivotal has made the mandatory training optional for Spring certification, I have been writing a lot about Spring 5.0 Core Professional exam here. In the past, I have written about general preparation tips, books, mock tests. So, after the months of hard work and preparation, you are finally ready for the day. In order to schedule for the Spring certification exam, you first need to buy an exam voucher from Pivotal's website. If you have taken their training course like the Core Spring training course, then you also receive a free voucher for 1 attempt.

How to Pass Spring Professional 5.0 Certification (VMware EDU-1202) in 2021

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 in 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) 

Top 30 Spring Core, Spring MVC and Spring Security Interview Questions for Beginners and Experienced Java developers

Spring Interview Questions Answers 
Spring Interview Question is one of the first things Java programmer should prepare before appearing on any Java or Spring interview. With the immense popularity of Spring frameworks like Spring MVC and Spring Boot in Java world, focus on Spring skills on interviews is increasing day by day. For those who don't know, the Spring framework is one of the most popular structures for Java applications, which aims to simplify Java development. It revolutionized the Java development when it initially came with concepts of  Dependency Injection and Inversion of Control, which made writing testable and maintainable Java application

What is the use of DispatcherServlet in Spring MVC? Interview Question

Hello guys, In today's article we are going to discuss one interesting and the important Spring MVC concept, which is also a popular Spring Interview question. How DispatcherServlet works internally in Spring MVC or What is the role of DispatcherServlet in Spring MVC is some of the frequently asked Spring MVC Interview Questions. You might have seen them already during your previous Java web development interviews but if you have not, it's a good question to know. In this article, I'll answer these questions by explaining What is DispatcherServlet and its importance in Spring MVC. The DispatcherServlet is one of the important components of the Spring MVC web framework and acts as a Front Controller.

10 ways to Learn a new Programming language or Tech skills in 2021?

One of the main challenges of being a programmer or software engineer is constant learning. Yes, that's true. As a programmer or developer, we always need to learn new things, sometimes every year. Thanks to C, Java, Linux, and SQL, we still have some ground, but the way these technologies are used changes every year. For example, we have a new JDK 14 release this year, even though many Java developers are still learning Java 8 and Java 11. We also have a Spring Framework release this year, combined with Spring Security 5.0 and Spring Boot 2.3.0 version, which many of us need to learn in 2021.

How to Convert a Stream to Set and List Collection in Java 8 - Example

Hello guys, if you are following Java releases then you know that introduction of Stream class is one f the most important addition in Java 8 as it makes processing bulk data really easy. Since data is the core part of any application and probably is the most important thing now than ever, a good knowledge of how to use Stream class effectively is important like how to work between Collections and Stream classes. If you have worked with Stream then you would have noticed that even though we can easily create a stream from a List and Set by using the stream() method added on java.uti.Collection interface, unfortunately, Stream class doesn't have a method to convert a Stream back to List or Set or any other data structure in Java.

The Java Remote Debugging with Eclipse Crash Course

The remote debugging of Java program is an ultimate tool in the arsenal of a Java developer, which is often becomes the last and only tool to investigate a bug on a Java application running on the remote host like on Linux server or Windows server. Almost all major Java IDE provides remote debugging like NetBeans, Eclipse, and IntelliJ IDEA, but I mostly use Eclipse for Java coding and so it's my preferred tool to remote debug a Java program. In order to set up remote debugging in Eclipse, you need to do a couple of tasks like you need to start your JVM with debugging parameters or arguments and then you need to create a "remote debug configuration" in Eclipse IDE itself.

Top 5 Internet of Things (IoT) Courses for Arduino and Raspberry PI in 2021 - Best of Lot

Hello folks, you might have heard about IoT or Internet of things as its slowly changing the word. But if you are not sure what does IoT means and why you should learn this skill in 2021 then let me give you a brief overview.  The Internet of Things or IoT is any material or machine that has an internet connection other than a general computer that you are using in your daily life or phones and it must have some computational power and some intelligence to be considered as an IoT device such as the cameras and the intelligent refrigerator. If you are looking to learn about the Internet of Things to create some useful projects then you have come to the right place.

How to Prepare for Spring Core Professional v.5.0 (VMware EDU-1202) Certification Exam in 2021

Hello guys, If you have been doing Java development then you may know the benefits of the Spring Framework that makes it one of the best Java frameworks in the community. As an open-source framework, Spring offered the opportunity to build applications on the Java Enterprise Edition platform. First introduced in October 2002, Spring Framework obtained a recent stable release in the form of Spring v5.0 which brought things like Reactive programming and WebFlux. There is a huge demand for Java developer with Spring experience, in fact, Spring is often considered as the most important skill while hiring Java developers and many companies prefer to hire those candidates who have Spring Professional certification in their resume.

5 Essential Spring Cloud Annotations Java and Microservice Developers Should Learn

If you are developing a Java application for Cloud, then you should learn Spring Cloud, a great framework and extension of the popular Spring framework, which can help you to develop a cloud-native Java application. Spring Cloud provides several necessary services required for a cloud-based Java application like configuration management, service discovery, circuit breakers, intelligent routing, micro-proxy, a control bus, one-time tokens, global locks, leadership election, distributed sessions, cluster state, etc.

10 Spring Framework Annotations Every Java Developer Should Learn

There is no doubt that the Spring framework is one of the most popular Java frameworks, and it has made the life of Java developer easy by providing some excellent features in the last 15 years. Spring uses dependency injection to configure and bind your application together, but it doesn't force you to implement one of its interfaces. This allows you to code POJO (everyday old Java objects), a class with methods and attributes to do most of your stuff. Then the questions come, how does Spring provides those magical features if it doesn't ask you to implement their interface, well, they use annotations and many of them. You will find some of the most common annotations in this article, which is a must for a Java developer to work with Spring.

How to Convert java.util.Date to java.time.LocalDate in Java 8 - Examples Tutorial

Hello guys, once you move to Java 8, you will often find yourself working between old and new Date and Time API, as not all the library and system you interact with will be using Java 8. One of the common tasks which arise from this situation is converting old Date to new LocalDate and that's what you will learn in this tutorial. There seems to be a couple of ways to convert a java.util.Date to java.time.LocalDate in Java 8, but which one is the best way? We'll figure it out in this article, but first, let's explore these different ways to convert a java.util.Date object to LocalDate in Java 8 code.

How to Add and Remove Elements from an Dynamic Array in Java?

Java beginners often ask how to add new elements to an array in Java? or how to remove elements from an array in Java? is that possible in Java? Well, no, it's not possible in Java because arrays length cannot be changed once created. This means neither you can add new elements nor you can remove an old one from an array in Java. All you can do is reassign values to a different bucket. For example, if you have a string array of length 3 like {"java", "is", "great"} then you can just replace the individual index to make it like {"Python", "is", "great"} by replacing "java" with "Python" at first index, but you cannot add or remove elements.

What is Variable and Method Hiding in Java - Example Tutorial

If Java, if you are not careful you can possibly hide both methods and variables of the superclass. Now you must be wondering what does it mean by hiding a variable or method in Java? A field or variable is said to hide all fields with the same name in superclasses. Similarly, a static method with the same name in a subclass can hide the method of the superclass. This can lead to subtle bugs, especially if you are expecting a different method to be called. In this article, I'll show you examples of both variables and methods hiding in Java so that you can understand and avoid them in the future.

Difference between 32-bit vs 64-bit JVM in Java?

Hello guys, wish you a very happy new year 2020. I hope you have set all your goals and inspired to achieve them. I have written some articles to help with your goals like The 2020 Java Developer RoadMap and 10 Things Java Programmer Should Learn in 2020. If you haven't made your goals or want to find out some useful resources to achieve your goals you can check out that article. Coming back to this article, it's short but informative one and it's also one of the most asked questions to me on Facebook and LinkedIn, what is the difference between a 32-bit and 64-bit JVM?

How to parse String to LocalDate in Java 8 - DateTimeFormatter Example

From Java 8 onward, you are no longer dependent on the buggy and bulky SimpleDateFormat class to parse and format date Strings into real Date object in Java e.g. java.util.Date. You can use the DateTimeFormatter class from java.time package for all your formatting and parsing need. You are also no longer required to use another buggy class java.util.Date if you are doing fresh development, but if you have to support legacy code then you can also easily convert LocalDate and LocalTime to java.util.Date or java.sql.Date. In this tutorial, we will learn about both parsing String to date in Java and formatting Date into String.

Java 8 StringJoiner Example - How to join multiple Strings with delimiter in Java

While everyone was looking at the lambda expression and Stream API, JDK quietly sneaked some of the exciting methods on its API. There are a lot of hidden gems on JDK 8 and I have uncovered many of them already in this blog and today we'll talk about one of such gems which you can use in your day-to-day programming activities like joining much String together. The Java 8 has added a new class called StringJoiner to join Strings. The java.util.StringJoiner can be used to join any number of arbitrary String, a list of String, or an array of String in Java. You can choose any delimiter to join String like comma, pipe, colon, or semi-colon. This class also allows you to specify a prefix and suffix while joining two or more String in Java.

Java 8 Comparator Example Using Lambda Expressions

Hello guys, After Java 8 it has become a lot easier to work with Comparator and Comparable classes in Java. You can implement a Comparator using lambda expression because it is a SAM type interface. It has just one abstract method compare() which means you can pass a lambda expression where a Comparator is expected. Many Java programmers often ask me, what is the best way to learn lambda expression of Java 8?  And, my answer is, of course by using it on your day to the day programming task. Since implementing equals(), hashcode(), compareTo(), and compare() methods are some of the most common tasks of a Java developer, it makes sense to learn how to use the lambda expression to implement Comparable and Comparator in Java.

How Stream.filter method works in Java 8 - An Example

In the last couple of Java 8 tutorials, you have learned how to use map(), flatMap(), and other stream methods to get an understanding of how Java 8 Stream and Lambda expressions make it easy to perform the bulk data operation on Collection classes like List or Set. In this Java 8 tutorial, I am going to share how to use the filter() method in Java 8, another key method of Stream class.  This is the one method you will always be used because it forms the key part of the Stream pipeline. If you have seen some Java 8 code, you would have already seen this method a couple of times.

Java 8 Stream filter() + findFirst Example

Suppose, you have a list of prime numbers and you need to find the first prime number which is greater than a given number? How do you find it? Don't tell that you will loop through the list and check each element and return the first element which is greater than the given number. Well, that's right but that's not what you should do in Java 8. That's good for Java 7 or earlier version but Java 8 offers you many better alternatives and one of them is Stream. You can use the Stream class along with filter() and findFirst() methods to find out an element based upon a Predicate, a functional interface for defining a condition which returns a boolean.

How to read a CSV file with Header in Java using Jackson library - Example Tutorial

Hello guys, today I am going to show you how to read a CSV file in Java with a simple example of Jackson API. For a long time, I only knew that Jackson can be used to parse JSON but later realized that you can also use it to parse or read CSV file in Java. The Jackson DataFormat CSV library allows you to read a CSV file in just a couple of lines and it's really powerful and feature-rich. For example, you can read a CSV file with a header or without a header. You can even read a tab-delimited text file like CSV. It's also highly configurable and allows you to define columns separator to read a text file with any delimiter. You can even use it to directly convert the CSV data into Java objects, just like we do while reading JSON String in Java.

How to reverse a singly linked list in Java without recursion? Iterative Solution

Hello guys, reverse a linked list is a common coding problem from Programming Job interviews and I am sure you have seen this in your career, if you are not, maybe you are a fresher and you will going to find about this very soon in your next technical interview. In the last article, I have shown you how to use recursion to reverse a linked list and today, I'll show you how to reverse a singly linked list in Java without recursion. A singly linked list, also known as just linked list is a collection of nodes which can only be traversed in one direction like in the forward direction from head to tail. Each node in the linked list contains two things, data and a pointer to the next node in the list.