Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

Invoker.java 449B

123456789101112131415
  1. public class Invoker {
  2. public static void main(String[] args) throws Throwable {
  3. try {
  4. new C();
  5. }
  6. catch (Throwable t) {
  7. boolean failedCorrectly =
  8. t.toString().contains("Unresolved compilation problem") &&
  9. t.toString().contains("The method main cannot be declared static");
  10. if (failedCorrectly)
  11. return;
  12. throw new RuntimeException("Constructor call should have failed!", t);
  13. }
  14. }
  15. }