Java

Java Thread wait, notify and notifyAll Example — step-by-step Programming tutorial on Progressive Robot

Java Thread wait, notify and notifyAll Example

URL: https://www.progressiverobot.com/java-thread-wait-notify-and-notifyall-example/ The Object class in java contains three final methods that allows threads to communicate about the lock status of a resource. These methods are wait(), notify() and notifyAll(). So today we will look into wait, notify and notifyAll in java program. wait, notify and notifyAll in Java ![wait and notify in java, wait […]

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
Log4j Levels Example - Order, Priority, Custom Filters — step-by-step Programming tutorial on Progressive Robot

Log4j Levels Example – Order, Priority, Custom Filters

URL: https://www.progressiverobot.com/log4j-levels-example-order-priority-custom-filters/ If you have used log4j, you will notice that there are many methods to log messages. For example: logger.trace("My Log message"); logger.debug("My Log message"); logger.info("My Log message"); Actually they corresponds to log4j levels. Log4j Levels Log4j provides many logging levels. Below is the complete list. TRACE: The TRACE Level designates finer-grained informational events […]

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

Mockito Verify

URL: https://www.progressiverobot.com/mockito-verify/ Mockito Verify methods are used to check that certain behavior happened. We can use Mockito verify methods at the end of the testing method code to make sure that specified methods are called. Mockito Verify Mockito verify() method can be used to test number of method invocations too. We can test exact number […]

Read more
Regular Expression in Java - Java Regex Example — step-by-step Programming tutorial on Progressive Robot

Regular Expression in Java – Java Regex Example

URL: https://www.progressiverobot.com/regular-expression-in-java-regex-example/ Welcome to Regular Expression in Java. It's also called Regex in Java. When I started programming, java regular expression was a nightmare for me. This tutorial is aimed to help you master Regular Expression in Java. I will also come back here to refresh my Java Regex learning. Regular Expression in Java ![Regular […]

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
ThreadPoolExecutor - Java Thread Pool Example — step-by-step Programming tutorial on Progressive Robot

ThreadPoolExecutor – Java Thread Pool Example

URL: https://www.progressiverobot.com/threadpoolexecutor-java-thread-pool-example-executorservice/ Java thread pool manages the pool of worker threads. It contains a queue that keeps tasks waiting to get executed. We can use ThreadPoolExecutor to create thread pool in Java. Java thread pool manages the collection of Runnable threads. The worker threads execute Runnable threads from the queue. java.util.concurrent.Executors provide factory and support […]

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

Bridge Design Pattern in Java

Today we will look into Bridge Design Pattern in java. When we have interface hierarchies in both interfaces as well as implementations, then bridge design pattern is used to decouple the interfaces from implementation and hiding the implementation details from the client programs. Bridge Design Pattern Just like [Adapter pattern](/community/tutorials/adapter-design-pattern-java "Adapter Design Pattern in Java […]

Read more
Composition vs Inheritance — step-by-step Programming tutorial on Progressive Robot

Composition vs Inheritance

Composition vs Inheritance is one of the frequently asked interview questions. You must have also heard to use Composition over Inheritance. Composition vs Inheritance Both composition and inheritance are [object-oriented programming concepts](/community/tutorials/oops-concepts-java-example). They are not tied up with any specific programming language such as Java. Before we compare composition over inheritance programmatically, let's have a […]

Read more
CHAT