Skip to content

Instantly share code, notes, and snippets.

@recursivecodes
Created June 11, 2019 17:49
Show Gist options
  • Select an option

  • Save recursivecodes/e8bc73c05075625eb7dc5d114574749e to your computer and use it in GitHub Desktop.

Select an option

Save recursivecodes/e8bc73c05075625eb7dc5d114574749e to your computer and use it in GitHub Desktop.
package com.example.fn;
public class HelloFunction {
public String handleRequest(String input) {
var result =
switch (input.toUpperCase())
{
case "MONDAY", "TUESDAY" -> "Get back to work! ";
case "WEDNESDAY" -> "Wait for the end of week. ";
case "THURSDAY" -> "Almost there... wait till tomorrow... ";
case "FRIDAY" -> "Prepare plan for the weekend! ";
case "SATURDAY", "SUNDAY" -> "Enjoy the weekend! ";
default -> "Please tell me which day... ";
};
return result;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment