Skip to content

Instantly share code, notes, and snippets.

@arialdomartini
Last active November 7, 2017 14:42
Show Gist options
  • Save arialdomartini/619115c5cf060098adcc3e887498af84 to your computer and use it in GitHub Desktop.
Save arialdomartini/619115c5cf060098adcc3e887498af84 to your computer and use it in GitHub Desktop.
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