wood burning stoves 2.0*
The moose likes Features new in Java 8 and the fly likes New Java 8 Features:  Which will be the easiest useful feature? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Features new in Java 8
Bookmark "New Java 8 Features:  Which will be the easiest useful feature?" Watch "New Java 8 Features:  Which will be the easiest useful feature?" New topic
Author

New Java 8 Features: Which will be the easiest useful feature?

Duncan MacFarland
Greenhorn

Joined: Apr 08, 2014
Posts: 3

Hi Richard,

Java 8 has a lot of new features that I don't know anything about, like Lambda expressions or functional programming. The latter of these two sound like Oracle has made Java non-OO if one wishes to code non-OO in Java. Is that a correct assessment?

My primary question is about what is in Java 8 for someone unfamiliar with the complex new things being added. What will I find most useful for basic "Model" programming, processing data on the back end that won't require a big learning curve just to understand them, let alone use them well?

I read your reply to another post related to what is happening to Java. I have been wondering since Java 5 if the JCP is essentially trying to make Java Java+every feature I ever liked in another language? Thanks.

Duncan


Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10207
    
166


What will I find most useful for basic "Model" programming, processing data on the back end that won't require a big learning curve just to understand them, let alone use them well?

You might want to look at the new Date API introduced in Java 8 http://docs.oracle.com/javase/8/docs/technotes/guides/datetime/index.html.


[My Blog] [JavaRanch Journal]
Richard Reese
author
Ranch Hand

Joined: Jul 13, 2011
Posts: 84
    
    5

Duncan,

The addition of new features to Java 8 does not encourage using non-OO techniques. For example, lambda expressions complement OO programming. They are based on anonymous inner classes.

Most of the new Java 8 features are tied to lambda expressions one way or another. Pai’s recommendation is a good one since the Date API is not as dependent on lambda expressions.

With regards to Java enhancements since Java 1.5, I don’t believe they are adding features just to add features. They are driven by Java community recommendations and other language developments. Of course developments like LINQ impact Java’s direction.


Richard Reese
Java 8 New Features: A Practical Heads-Up Guide
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39409
    
  28
Most enhancements have been driven by community pressure.
The use of a λ where one would have used an anonymous class of an interface with one method is interesting. The MyApp$1.class files are no longer to be seen. Not only do you save something like 7 lines of code, but you also save a file, since the anonymous object is no longer necessary.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: New Java 8 Features: Which will be the easiest useful feature?