Class EitherDemo

java.lang.Object
com.dudko.tools.safejavastreams.demo.core.EitherDemo

public class EitherDemo extends Object
Example of using Either

Either is a container that can contain either a value of type T (Right) or an error of type E (Left). This avoids the use of exceptions for error handling.

In this example, we create several Either objects and demonstrate their use.

  • Constructor Details

    • EitherDemo

      public EitherDemo()
  • Method Details

    • main

      public static void main(String[] args)