Programming

Java LinkedList - LinkedList In Java — step-by-step Programming tutorial on Progressive Robot

Java LinkedList – LinkedList In Java

URL: https://www.progressiverobot.com/java-linkedlist-linkedlist-java/ Java LinkedList is an implementation of the List and Deque interfaces. It is one of the frequently used List implementation class. It extends AbstractSequentialList and implements List and Deque interfaces. It is an ordered collection and supports duplicate elements. It stores elements in Insertion order. It supports adding null elements. It supports index […]

Read more
How to Sort a List in Java — step-by-step Programming tutorial on Progressive Robot

How to Sort a List in Java

URL: https://www.progressiverobot.com/java-sort-list/ Sometimes we have to sort a list in Java before processing its elements. In this tutorial, we will learn how to sort a list in the natural order. We will also learn how to use our own Comparator implementation to sort a list of objects. Java List is similar to arrays except that […]

Read more
Java Thread Join Example — step-by-step Programming tutorial on Progressive Robot

Java Thread Join Example

URL: https://www.progressiverobot.com/java-thread-join-example/ Java Thread join method can be used to pause the current thread execution until unless the specified thread is dead. There are three overloaded join functions. Java Thread join ![java thread join, thread join example, java thread join example, thread join](images/java-thread-join-example-section-1.png) public final void join(): This java thread join method puts the current […]

Read more
Java SE 8 Interview Questions and Answers (Part-2) — step-by-step Programming tutorial on Progressive Robot

Java SE 8 Interview Questions and Answers (Part-2)

URL: https://www.progressiverobot.com/javase8-interview-questions-part2/ In my previous post, I have discussed some important Java SE 8 Interview Questions and Answers. In this post, we are going to discuss some more Java SE 8 Interview Questions and Answers. Before reading this post, please go through my previous post at: "[Java SE 8 Interview Questions (Part 1)](/community/tutorials/javase8-interview-questions-part1)". Java SE […]

Read more
JUnit5 Tutorial — step-by-step Programming tutorial on Progressive Robot

JUnit5 Tutorial

URL: https://www.progressiverobot.com/junit5-tutorial/ JUnit5 Tutorial In this Junit tutorial, we will introduce basics of JUnit5 and its new features using examples. In Java world, JUnit is one of the popular framework used to implement unit tests against java code. JUnit primarily helps developers to test their code on the [JVM](/community/tutorials/java-jvm-memory-model-memory-management-in-java) by themselves. JUnit5 Architecture JUnit Platform […]

Read more
Mockito @InjectMocks - Mocks Dependency Injection — step-by-step Programming tutorial on Progressive Robot

Mockito @InjectMocks – Mocks Dependency Injection

URL: https://www.progressiverobot.com/mockito-injectmocks-mocks-dependency-injection/ Mockito @InjectMocks annotations allow us to inject mocked dependencies in the annotated class mocked object. This is useful when we have external dependencies in the class we want to mock. We can specify the mock objects to be injected using [@Mock](/community/tutorials/mockito-mock-examples) or [@Spy](/community/tutorials/mockito-spy-partial-mock) annotations. Mockito @InjectMocks Mockito tries to inject mocked dependencies using […]

Read more
Priority Queue Java — step-by-step Programming tutorial on Progressive Robot

Priority Queue Java

URL: https://www.progressiverobot.com/priority-queue-java/ Every now and then we need to process items of a queue in a particular order. Priority queue is a Data Structure that does the job. Java priority queue is different from “normal” [queue](/community/tutorials/java-queue). Instead of “First-In-First-Out”, it retrieves the items in order of their priority. Priority Queue Java The java.util.PriorityQueue class, provides […]

Read more
Reverse a Linked List — step-by-step Programming tutorial on Progressive Robot

Reverse a Linked List

URL: https://www.progressiverobot.com/reverse-a-linked-list/ Reversing a Linked List is an interesting problem in data structure and algorithms. In this tutorial, we'll be discussing the various algorithms to reverse a [Linked List](/community/tutorials/java-linkedlist-linkedlist-java) and then implement them using Java. Reverse a Linked List LinkedList is a data structure which stores the data in a linear way. Though not in […]

Read more
CHAT