Programming

Java ThreadLocal Example — step-by-step Programming tutorial on Progressive Robot

Java ThreadLocal Example

URL: https://www.progressiverobot.com/java-threadlocal-example/ Java ThreadLocal is used to create thread local variables. We know that all threads of an Object share it's variables, so the variable is not thread safe. We can use synchronization for thread safety but if we want to avoid synchronization, we can use ThreadLocal variables. Java ThreadLocal ![ThreadLocal, Java ThreadLocal](images/java-threadlocal-example-section-1.png) Every thread […]

Read more
JDBC Interview Questions and Answers — step-by-step Programming tutorial on Progressive Robot

JDBC Interview Questions and Answers

URL: https://www.progressiverobot.com/jdbc-interview-questions-and-answers/ Welcome to JDBC Interview Questions and Answers. JDBC API is used to connect to relational databases and run SQL queries from Java Programs. In the last few articles, we learned about JDBC API and its important features. This article is aimed to provide some of the important JDBC Interview Questions with Answers to […]

Read more
Linear Search Algorithm and Implementation in C — step-by-step Programming tutorial on Progressive Robot

Linear Search Algorithm and Implementation in C

URL: https://www.progressiverobot.com/linear-search-algorithm-c/ Linear Search is basically a sequential search algorithm. In this algorithm, the key element is searched in the given input [array](/community/tutorials/arrays-in-c) in sequential order. If the key element is found in the input array, it returns the element. Linear Search Algorithm Linear_Search ( Array X, Value i) Set j to 1 If j […]

Read more
Mockito Mock Static Method - PowerMock — step-by-step Programming tutorial on Progressive Robot

Mockito Mock Static Method – PowerMock

URL: https://www.progressiverobot.com/mockito-mock-static-method-powermock/ Mockito allows us to create mock objects. Since static method belongs to the class, there is no way in Mockito to mock static methods. However, we can use PowerMock along with Mockito framework to mock static methods. Mockito Mock Static Method using PowerMock PowerMock provides different modules to extend [Mockito framework](/community/tutorials/mockito-tutorial) and run […]

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
Scanner Class in Java — step-by-step Programming tutorial on Progressive Robot

Scanner Class in Java

URL: https://www.progressiverobot.com/scanner-class-in-java/ Java Scanner class is part of the java.util package. It was introduced in Java 1.5 release. The Scanner is mostly used to receive user input and parse them into primitive data types such as int, double or default String. It's a utility class to parse data using regular expressions by generating tokens. Java […]

Read more
State Design Pattern in Java — step-by-step Programming tutorial on Progressive Robot

State Design Pattern in Java

URL: https://www.progressiverobot.com/state-design-pattern-java/ State design pattern is one of the behavioral design pattern. State design pattern is used when an Object change its behavior based on its internal state. State Design Pattern ![state design pattern, state design pattern in java, state pattern](images/state-design-pattern-java-section-1.png) If we have to change the behavior of an object based on its state, […]

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
Understanding Boolean Logic in Go — step-by-step Programming tutorial on Progressive Robot

Understanding Boolean Logic in Go

The Boolean data type can be one of two values, either True or False. We use Booleans in programming to make comparisons and to control the flow of the program. In this tutorial, we’ll go over the basics you’ll need to understand how Booleans work in Go, including Boolean comparison and logical operators, and truth tables.

Read more
Información sobre mapas en Go — step-by-step Programming tutorial on Progressive Robot

Información sobre mapas en Go

La mayoría de los lenguajes de programación modernos incluyen el concepto de tipo de diccionario o de hash. Estos tipos se utilizan comúnmente para almacenar datos en pares con una clave que se asigna a un valor. En Go, el tipo de datos de mapa es lo que la mayoría de los…

Read more
CHAT