Saturday, July 31, 2010

Operators: Twisty.java

Courtesy of SCJP Sun® Certified Programmer for Java™ 6 Study Guide Exam (310-065) (9780071591065)
Chapter 4, Question 6












Line 9: index = 1, so the program points to array element {6,5,4}. However, index++ means that index = 2, so now the 2nd element within {6,5,4} is selected, which is 4.

No comments:

Post a Comment