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

public class TryDemo extends Object
Example of using Try

Try is a container that can contain either a Success or a Failure. This avoids using exceptions to handle errors.

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

  • Constructor Details

    • TryDemo

      public TryDemo()
  • Method Details

    • main

      public static void main(String[] args)
    • getUserToken

      private static String getUserToken()