ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Common Board

Sasha Bar [TNU] Java -> System.exit(1) [5] 13 Apr 2010 04:03
Why does System.exit(1) get WA instead of Crash?
Sasha Bar [TNU] Re: Java -> System.exit(1) [4] 15 Apr 2010 03:31
I want to get CRASH on Timus in run() function, how can i do this?

public class Main implements Runnable {
....public void run() {
........throw new RuntimeException();
....}
....public static void main(String[] args) {
........new Thread(new Main()).start();
....}
}

This code gets WA instead of Crash!


Edited by author 15.04.2010 03:34
ile Re: Java -> System.exit(1) [2] 16 Apr 2010 01:05
I didn't check it, but something like this should cause CRASH:

int[] a = new int[10];
System.out.println(a[20]);
ile Re: Java -> System.exit(1) [1] 16 Apr 2010 01:06
or...

System.out.println(1/0);
Sasha Bar [TNU] Re: Java -> System.exit(1) 17 Apr 2010 17:00
no, it didn't help
Moonstone Re: Java -> System.exit(1) 11 May 2010 20:01
Yes, it gets WA... But why? Can anybody explain me?