That was a quick answer to my question on J2ME . I read that switch statement can now take string cases. Are there any other any changes or new features for existing control structures as we know them in Java 6?
What are functional languages like? Could you throw more light on Clojure, Groovy and Scala. Thank you.
Functional languages work largely by returning values, and most functions are called in a sort of recursive mannr.
By new control structures, you might mean try‑with‑resources, or multiple catch types, or the <> in generics.
Thanks Guys for the answers guys but I really need to get to the root of this. Functional languages help us write more safer OO code but one of the main features is that code and data are one?
Hmmm that for me looks like potential trouble if you ask me.
Where do we draw the boundaries so we do not mistake? Maybe my questions arise from the fact that I have used non-functional imperative languages. However, I am not biased and I am willing to explore these
new range of functional languages especially Clojure which is also Dynamic.
Functional does not trump OO nor visa versa. There are just certain idioms where functional works out better, for example filter, map and reduce type operations that don't alter the original collection. You'll find common places in Java code such as Listeners, Handlers, Callables and Runnables as will as the traditional for loop with an if filter inside of it that are ripe for writing in a more functional manner.
NB: Arguably anonymous inner classes in Java are functional... it's just a clunky syntax :-)
subject: Any new control structures or new aspects covered in ' The Well Grounded Java Developer'?