Last active
November 7, 2017 14:42
-
-
Save arialdomartini/619115c5cf060098adcc3e887498af84 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.FileOutputStream; | |
import java.io.PrintStream; | |
class Bar { | |
public static void Main() throws Exception { | |
StringChecker.CheckFirstCharacter("Foobar"); | |
} | |
static class StringChecker { | |
public static void CheckFirstCharacter(String name) throws Exception {{ | |
if (name.startsWith("f")) { | |
Runnable runnable = () -> {name.toLowerCase();};} | |
throw new Exception("Cannot start with F"); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment