Java

Java Keytool Essentials: Working with Java Keystores — step-by-step Security tutorial on Progressive Robot

Java Keytool Essentials: Working with Java Keystores

Java Keytool is a key and certificate management tool that is used to manipulate Java Keystores, and is included with Java. A Java Keystore is a container for authorization certificates or public key certificates, and is often used by Java-based applications for encryption,…

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

Java Queue – Queue in Java

URL: https://www.progressiverobot.com/java-queue/ Java Queue is an interface available in java.util package and extends java.util.Collection interface. Just like Java List, Java Queue is a collection of ordered elements (Or objects) but it performs insert and remove operations differently. We can use Queue to store elements before processing those elements. ![](images/java-queue-section-1.png) Java Queue In this section, we […]

Read more
Java Singleton Design Pattern Best Practices with Examples — step-by-step Programming tutorial on Progressive Robot

Java Singleton Design Pattern Best Practices with Examples

URL: https://www.progressiverobot.com/java-singleton-design-pattern-best-practices-examples/ Introduction _Java Singleton Pattern_ is one of the _Gangs of Four Design patterns_ and comes in the _Creational Design Pattern_ category. From the definition, it seems to be a straightforward design pattern, but when it comes to implementation, it comes with a lot of concerns. In this article, we will learn about singleton […]

Read more
Java Thread Dump - VisualVM, jstack, kill -3, jcmd — step-by-step Programming tutorial on Progressive Robot

Java Thread Dump – VisualVM, jstack, kill -3, jcmd

URL: https://www.progressiverobot.com/java-thread-dump-visualvm-jstack-kill-3-jcmd/ Java Thread dump is list of all the threads active in the JVM. Java Thread Dump Java thread dump is very helpful in analyzing bottlenecks in the application and [deadlock](/community/tutorials/deadlock-in-java-example "Java Deadlock") situations. Here we will learn multiple ways through which we can generate thread dump for a java program. These instructions are […]

Read more
Java Zip File Folder Example — step-by-step Programming tutorial on Progressive Robot

Java Zip File Folder Example

URL: https://www.progressiverobot.com/java-zip-file-folder-example/ Today we will look into java zip file example. We will also compress a folder and create zip file using java program. Java ZIP java.util.zip.ZipOutputStream can be used to compress a file into ZIP format. Since a zip file can contain multiple entries, ZipOutputStream uses java.util.zip.ZipEntry to represent a zip file entry. Java […]

Read more
JUnit Display Name - @DisplayName — step-by-step Programming tutorial on Progressive Robot

JUnit Display Name – @DisplayName

URL: https://www.progressiverobot.com/junit-display-name-displayname/ JUnit @DisplayName annotation is used to provide a custom name for the test class and test methods. We can use spaces, special characters, and even emojis in the display name. JUnit Display Name Example By default, [JUnit](/community/tutorials/junit5-tutorial) reporting prints the class name and method name in the IDE test report. We can use […]

Read more
Mockito mock examples — step-by-step Programming tutorial on Progressive Robot

Mockito mock examples

URL: https://www.progressiverobot.com/mockito-mock-examples/ Mockito mocking framework provides different ways to mock a class. Let's look at different methods through which we can mock a class and stub its behaviors. Mockito mock method We can use [Mockito](/community/tutorials/mockito-tutorial) class mock() method to create a mock object of a given class or interface. This is the simplest way to […]

Read more
Proxy Design Pattern — step-by-step Programming tutorial on Progressive Robot

Proxy Design Pattern

URL: https://www.progressiverobot.com/proxy-design-pattern/ Proxy Design pattern is one of the Structural design pattern and in my opinion one of the simplest pattern to understand. Proxy Design Pattern ![proxy design pattern](images/proxy-design-pattern-section-1.png) Proxy design pattern intent according to GoF is: Provide a surrogate or placeholder for another object to control access to it. The definition itself is very […]

Read more
How to Shuffle an Array in Java — step-by-step Programming tutorial on Progressive Robot

How to Shuffle an Array in Java

URL: https://www.progressiverobot.com/shuffle-array-java/ There are two ways to shuffle an array in Java. Collections.shuffle() Method Random Class 1. Shuffle Array Elements using Collections Class We can create a list from the array and then use the Collections class shuffle() method to shuffle its elements. Then convert the list to the original array. package com.journaldev.examples; import java.util.Arrays; […]

Read more
Thread Life Cycle in Java - Thread States in Java — step-by-step Programming tutorial on Progressive Robot

Thread Life Cycle in Java – Thread States in Java

URL: https://www.progressiverobot.com/thread-life-cycle-in-java-thread-states-in-java/ Understanding Thread Life Cycle in Java and Thread States are very important when you are working with Threads and programming for multithreaded environment. From our last tutorial, we can create a [java thread](/community/tutorials/java-thread-example "Java Thread Example – Extending Thread Class and Implementing Runnable Interface") class by implementing Runnable interface or by extending Thread […]

Read more
CHAT