From 882aa71bf2dc2a0af12da9c7638d2651c554f5c6 Mon Sep 17 00:00:00 2001 From: lakshyatyagi24-1 <73069805+lakshyatyagi24-1@users.noreply.github.com> Date: Fri, 28 Oct 2022 23:45:32 +0530 Subject: [PATCH] Create getDocumentType.java --- getDocumentType.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 getDocumentType.java diff --git a/getDocumentType.java b/getDocumentType.java new file mode 100644 index 0000000..1cea59d --- /dev/null +++ b/getDocumentType.java @@ -0,0 +1,12 @@ +public String getDocumentType(String input) throws Exception { + + String formattedInput = input.toLowerCase(); + + switch (formattedInput) { + case "uuid": + return "E"; + default: + throw new Exception("Invalid Document Type"); + } + + }