Interface CheckedRunnable

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@NullMarked @FunctionalInterface public interface CheckedRunnable
A functional interface representing a runnable that may throw a checked exception. This is a variation of the standard Runnable interface, intended for use in scenarios where the operation may involve checked exceptions.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    run()
    Executes an operation that may throw a checked exception.
  • Method Details

    • run

      void run() throws Exception
      Executes an operation that may throw a checked exception.
      Throws:
      Exception - if an error occurs during execution