🆕 Free Interactive Selenium, Playwright & API tools — no signup — Start Free Automation Roadmap →
📁
All Topics › Java for Testing

Java for Testing

Java for test automation: basics, OOP, keywords, strings, collections, exceptions and programs.

18 Articles
22 Beginner
18 Intermediate
5 Advanced
Intermediate 📅 Oct 5, 2026 👁 22 views

Java Queue, Deque and PriorityQueue + Iterators, Collections Utilities and Special Maps

Java Queue, Deque and PriorityQueue with examples, fail-fast vs fail-safe iterators, the Collections utility class and special maps.

Intermediate 📅 Oct 5, 2026 👁 30 views

Multithreading in Java: Creating Threads, Thread Lifecycle, synchronized and volatile

Multithreading in Java with examples: three ways to create threads, the thread lifecycle, race conditions, synchronized, volatile and AtomicInteger.

Intermediate 📅 Oct 5, 2026 👁 41 views

Java Generics: Generic Classes, Methods, Wildcards and Type Erasure

Java generics with examples: generic classes and methods, bounded types, wildcards (? extends, ? super, PECS) and type erasure, with interview questions.

Intermediate 📅 Oct 5, 2026 👁 20 views

Java Lambda Expressions, Functional Interfaces, Method References and Optional

Java lambda expressions explained: syntax, functional interfaces (Function, Predicate, Consumer, Supplier), method references, how lambdas work, and Optional.

Intermediate 📅 Oct 5, 2026 👁 42 views

Java Streams API: filter, map, collect, Collectors and Parallel Streams

Java Streams API with examples: building a pipeline, intermediate and terminal operations, Collectors (groupingBy, joining), primitive streams.

Intermediate 📅 Oct 5, 2026 👁 33 views

Java 8 to Java 21 Features: Lambdas, var, Records, Sealed Classes, Pattern Matching and Modules

What changed from Java 8 to Java 21: lambdas and streams, modules, var, text blocks, records, pattern matching, sealed classes.

Intermediate 📅 Oct 5, 2026 👁 32 views

Mockito Tutorial: Mocks, Stubbing, Verification, Spies and Argument Captors

Mockito tutorial with JUnit 5: @Mock and @InjectMocks, stubbing with when/thenReturn, verify, argument matchers, ArgumentCaptor, spies and common mistakes.

Intermediate 📅 Oct 5, 2026 👁 38 views

AssertJ Tutorial: Fluent Assertions for Strings, Collections, Objects and Exceptions

AssertJ fluent assertions with examples: strings, numbers, collections, objects, exceptions, soft assertions and custom messages, for JUnit and TestNG.

Intermediate 📅 Oct 5, 2026 👁 28 views

Java Best Practices: Clean Code, SOLID, Effective Java, Immutability and Anti-Patterns

Java best practices with examples: naming and function design, SOLID, logging, Effective Java rules, immutable objects.

Intermediate 📅 Oct 5, 2026 👁 33 views

Regular Expressions in Java: Pattern, Matcher, Groups and Common Regex Examples

Regular expressions in Java: Pattern and Matcher, character classes, quantifiers, groups, lookarounds, replaceAll and split.

Intermediate 📅 Oct 5, 2026 👁 29 views

Java File I/O: Writing Files, Byte and Character Streams, and NIO.2

Java file I/O explained: writing files, InputStream/OutputStream and Reader/Writer hierarchies, buffering, java.nio Files and Path.

Intermediate 📅 Oct 5, 2026 👁 36 views

Java HttpClient (Java 11+): GET, POST, Headers, Async Requests and Sockets

Java 11+ HttpClient with examples: GET and POST requests, headers, timeouts, async calls, reading JSON, and basic sockets.

Intermediate 📅 Oct 5, 2026 👁 32 views

Java Object Class Methods: equals, hashCode, toString, getClass, clone, wait and notify

The methods every Java class inherits from Object: equals and hashCode (and their contract), toString, getClass, clone, finalize, wait, notify and notifyAll.

Intermediate 📅 Oct 5, 2026 👁 26 views

Exception Handling in Java: try-catch-finally, Checked vs Unchecked, Stack Traces

Exception handling in Java: hierarchy, try-catch-finally, try-with-resources, checked vs unchecked, throw vs throws, stack traces and custom exceptions.

Intermediate 📅 Oct 5, 2026 👁 22 views

Assertions in Java: the assert Keyword vs TestNG, JUnit and AssertJ

Java assertions: the assert keyword, enabling it with -ea, when not to use it, and how it differs from TestNG, JUnit and AssertJ assertions, hard and soft.

Intermediate 📅 Oct 5, 2026 👁 27 views

JAR Files in Java: Create, Run and Build Executable JARs (with Maven)

What JAR files are and how to use them: create with the jar tool, the manifest and Main-Class, java -jar vs -cp, fat JARs with Maven, and JARs testers run.

Intermediate 📅 Jul 9, 2026 👁 110 views

JDBC and Database Connectivity in Java: Steps & Examples

Learn JDBC in Java — what it is, what a JDBC driver does, and the standard steps to connect a Java application to a database, with a full code example.

Intermediate 📅 Jul 9, 2026 👁 100 views

Java Collections: Set, HashMap, ArrayList vs LinkedList & Thread-Safe Maps

Learn Java collections — the Set interface, HashMap internals, ArrayList vs LinkedList, synchronized maps vs ConcurrentHashMap, and forEach vs Iterator.