By Guus , 5 September 2003

All right -- I won't keep you waiting any longer... I made it. It would have been a big disgrace if I didn't, after all these years programming, but I'm happy with the result. There were 61 questions and my score was 90%. For the programmers, what is the result of this code when run?

class Test {
  public static void main(String args[]) {
    int i = 1, j = 0;
    switch (i) {
      case 4: j += 6;
      case 2: j += 3;
      default: j += 2;
      case 0: j += 4;
    }
    System.out.println("j = " + j);
  }
}

It's not a very prestigious certification, but I'm happy I did it. It forced me to study many details of the language I had never studied before. I found that quite useful. Now it's up to the next one, which will be much more difficult.

Topic