The most elegant way to locate two enums
At first, I think you don't need the value field. Indeed, as shown in createFromInt, you refer to enum values with their position (Option.values()[option]).

I suggest the following refactoring.

enum Option {
  ADD_CAR("Add car"),
  ADD_MOTORCYCLE("Add motorcycle"),
  PRINT_CARS("Print cars"),
  PRINT_MOTORCYCLES("Print motorcycles");

  private String description;

  Option(String description) {
    this.description = description;
  }

  @Override
  public String toString() {
    return this.ordinal() + "-" + description;
  }

  public static Option getFromIndex(int optionIndex) throws NoSuchOptionException {
    if (optionIndex &gt;= 0 &amp;&amp; optionIndex &lt; values().length) {
      return Option.values()[optionIndex];
    }
    throw new NoSuchOptionException("Brak opcji o ID: " + optionIndex);
  }
}


I prefer getFromIndex because the argument is an index or a value and you don't create new instances of the enum.