You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
123456789101112131415 |
- public class Invoker {
- public static void main(String[] args) throws Throwable {
- try {
- new C();
- }
- catch (Throwable t) {
- boolean failedCorrectly =
- t.toString().contains("Unresolved compilation problem") &&
- t.toString().contains("The method main cannot be declared static");
- if (failedCorrectly)
- return;
- throw new RuntimeException("Constructor call should have failed!", t);
- }
- }
- }
|