Courtesy of SCJP Sun® Certified Programmer for Java™ 6 Study Guide Exam (310-065) (9780071591065)
Chapter 4, Question 3
If we invoke with the following:
java Fork test
the program will throw an ArrayIndexOutOfBoundsException at runtime. Because we are using | (or) rather than || (short-circuit), on line 3, both args.length == 1 and args.equals("test") are evaluated. Since there is only one argument, i.e. test, the args on line 3 is out-of-bounds.