This post originated from an RSS feed registered with Java Buzz
by Ben Hosking.
Original Post: SCJP 5 Resource - Flow Control
Feed Title: A Funny Java Flavoured Look at the World
Feed URL: http://businesslogs.com/WebLog/RSS.xml
Feed Description: The blog looks at using Java and programming in general as it pops up in life as a Java programmer. It will have links to interesting Java articles and resources. It will also have a lot of SCJP Java 1.5 information and links as I am currently studying
This is probably one of the easier topics on the Java 5 exam because if you are programming in Java then you will have had to use the flow control (IF and SWITCH statements etc).
The code also deals with the enum. This can be an exam nightmare because of all the extra things you can do with enums and the fact that it acts like a special class in many ways. It has the potential to provide some very tricky Java 5 exam questions so any information on this topic is welcome to me.
The Enum is also allowed in switch statements, this can be an exam gotcha because you might think that this isn't allowed and they are trying to catch you out, in fact they are using the double bluff.
Enums are one of the new features added in Java 5 that are both simple and complex at the same time. As soon as you see them you think cool, this is going to be really useful and then you see the examples or Exam questions on Enums and you think, oh my god look at all the possible syntax errors I could run into. Unlike some of the other features added into Java 5 Enums was done excellently and doesn't seem as much of a hack as the other features.
The tutorial also explains the new enhanced for loop which is a piece of cake but you have to make sure you understand what is on each side of the enhanced for loop.