• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java 9 and Beginners  RSS feed

 
Tom Nielson
Ranch Hand
Posts: 53
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm working on some material to train non-programmers on Java 8 and apply it practically, and I am including topics like lambdas. streams. and immutability. But now Java 9 is now around the corner. I've been keeping an eye on Java 9 and been wondering if the features really would make an impact on my beginner's curriculum. The only thing I could think of is the Currency API deprecating usage of BigDecimal for money, but it looks like that got slashed for release.

The Jigsaw stuff is definitely significant, but I don't think it is going to affect the initial learning experience for a beginner. Same with GC and under-the-hood improvements. Are there any Java 9 topics that would be relevant to a beginner just like lambdas were in Java 8?
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 37252
519
Eclipse IDE Java VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The command line changes with respect to profiles/modules (vs the classpath.) This won't affect beginners right away, but I could see it showing up once they start learning about libraries like JDBC.
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 37252
519
Eclipse IDE Java VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh! Collections for primitives could come up early on.
 
Tom Nielson
Ranch Hand
Posts: 53
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne Boyarsky wrote:The command line changes with respect to profiles/modules (vs the classpath.) This won't affect beginners right away, but I could see it showing up once they start learning about libraries like JDBC.


I'll need to research that. Are you referring to the command line as in the JDK build tools? The material I'm training with uses Eclipse. But yeah using JDBC and standard libraries, I really hope that doesn't get too disrupted with the Jigsaw stuff...
 
Tom Nielson
Ranch Hand
Posts: 53
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne Boyarsky wrote:Oh! Collections for primitives could come up early on.


I think I missed that memo... so does Java 9 officially allow me to create an ArrayList<int> ?
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 37252
519
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tom,
I'm not sure of the syntax. Brian Goetz mentioned it in a NY Java SIG presentation last week. OF course it came with the standard Oracle disclaimer that anything can change.
 
Tom Nielson
Ranch Hand
Posts: 53
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne Boyarsky wrote:Tom,
I'm not sure of the syntax. Brian Goetz mentioned it in a NY Java SIG presentation last week. OF course it came with the standard Oracle disclaimer that anything can change.


Haha kind of like they did with Currency. I'll check it out and talk to Brian on Twitter if my research comes empty.
 
Campbell Ritchie
Marshal
Posts: 55761
163
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congratulations

You were the first person we caught asking questions about Java9, so you now have the brand new Java9 forum all to yourself. We hope others will keep you company here to fill the forum.
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Interesting! I have been off from Java for a while as I'm doing lots of Scala these days. What is with the JDBC API? Are there plans with Java 9 to make it asynchronous on the socket? Is this even possible?
 
Piet Souris
Rancher
Posts: 1983
67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
com'on people, this is our chance!
Send in your questions about java 10, 11, 12, 13, ...!
 
Anayonkar Shivalkar
Bartender
Posts: 1558
5
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Great!

Sorry was away from forum since some time

Currently I'm experimenting on Jigsaw early access build and have few questions. Finally I have place to ask them

Thanks!
 
Anayonkar Shivalkar
Bartender
Posts: 1558
5
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tom Nielson wrote:
Jeanne Boyarsky wrote:Tom,
I'm not sure of the syntax. Brian Goetz mentioned it in a NY Java SIG presentation last week. OF course it came with the standard Oracle disclaimer that anything can change.


Haha kind of like they did with Currency. I'll check it out and talk to Brian on Twitter if my research comes empty.

Well, Jeanne's update might be latest, but at JavaOne 2015 (around a month back), Brian mentioned that this feature (I think it is value types) will be part of project Valhalla - which is maybe Java 10 (again - same 'safe harbor' slide) - but not in Java 9.

Java 9 is all modules - which was supposed to release by September 2016, but as per latest updates, it might take March 2017 for GA (General Availability).

Thanks.
 
Stephan van Hulst
Saloon Keeper
Posts: 7817
142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java 9 may come with a tool jshell that will allow you to run java statements and expressions line by line. This will make playing around with the language a lot easier, and you can even give interactive lectures.
 
Anayonkar Shivalkar
Bartender
Posts: 1558
5
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yup. Sorry I forgot about those.

Just gave a lecture in my office about modular development so I keep forgetting other new stuff in Java 9 ☺
 
Rob Spoor
Sheriff
Posts: 21092
85
Chrome Eclipse IDE Java Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From what I saw at Devoxx, JShell is almost a certainty for Java 9.

Also in Java 9 will (most likely) be static methods to create sets, lists, etc. Instead of adding new language syntax, the interfaces will get new static methods (yay Java 8!) to create them. These all return immutable and optimized* implementations. For instance:
What Stuart Marks told us is that each of these will have 12(!) overloads: from 0 to (inclusive) 10 arguments (key-value pairs for Maps), plus a varargs version. For Map the varargs takes Map.Entry objects which can be created using static method Map.entry(K, V). For instance:

* For 1 argument, the implementation will probably store the single value in a single instance field, and similarly for 2, 3, ....
 
Stevens Miller
Bartender
Posts: 1444
30
C++ Java Netbeans IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Piet Souris wrote:com'on people, this is our chance!
Send in your questions about java 10, 11, 12, 13, ...!

Alas, in my case, I expect each of them to be, "So, it still doesn't have unsigned bytes, does it?"
 
Piet Souris
Rancher
Posts: 1983
67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Although you are now officially the first one with questions about
JavaXX, still no sign of these dedicated forums... Well, maybe tomorrow
morning.
But maybe we will finally have unsigned BigIntegers.
 
Stevens Miller
Bartender
Posts: 1444
30
C++ Java Netbeans IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bytes. Unsigned bytes.

I need unsigned bytes.
 
Tom Nielson
Ranch Hand
Posts: 53
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Joe Harry wrote:Interesting! I have been off from Java for a while as I'm doing lots of Scala these days. What is with the JDBC API? Are there plans with Java 9 to make it asynchronous on the socket? Is this even possible?


That would be interesting. I did make a TabularResultSet wrapper a year ago which implements Spliterator and allows a parallelStream(). The trick though is you have to serially iterate the records, and implement a ResultSet around a cached array of values for a given record so it gets parallelized safely. That way no concurrent next() calls happen. I could not imagine parallelizing any other way.

I have not used that utility in awhile though. I've been using RxJava and RxJava-JDBC which is now my primary means of working with databases. I can achieve similar parallelization through that.

If you meant asynchronous from an IO standpoint, I apologize for my digression. I was thinking after the IO part.
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16028
87
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Joe Harry wrote:Interesting! I have been off from Java for a while as I'm doing lots of Scala these days. What is with the JDBC API? Are there plans with Java 9 to make it asynchronous on the socket? Is this even possible?

An asynchronous JDBC API is not going to happen soon - JDBC drivers will need to be modified to support this.

Collections of primitives, for example List<int> without the need for auto-boxing, is indeed a feature that is being investigated as part of Project Valhalla and will certainly not be in Java 9; it might come in Java 10 or even later. I have some blog posts about value types and generic specialization. These are things that are not easy to add to the Java language and keep everything backwards compatible.

Until recently, the release of Java 9 was planned for September 2016, but it has been delayed by 6 months - the people at Oracle need more time to get it right: Java 9 delayed by slow progress on modularization.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!