John Shepard shows us how to use the java.time API in Java 8. While not absolutely complete, and improvements seem to be on deck for Java 9 and 10, there is support for the new time API.
In Java, there is an issue with String when using characters that take up more than 2 bytes in UTF-16.
substring() and similar methods can split the character in the middle. I was thinking switching Strings to UTF-8 might be good, and there are currently two JEPs for Java 9 somewhat related to this. 226: UTF-8 Property Files and 254: Compact Strings. But thinking about this a little more, I don’t necessarily want a UTF-8 String class, but a String class that works with all unicode characters. Here’s how I did it.
One aspect of Java 8 that would be nice to change is the handling of nulls. Can testName.getName() be changed so that a NullPointerException is never thrown, even if testName is null? Is it possible to modify java to support this directly? Java does provide an interface to read the Abstract Syntax Tree (AST) in … Read More
See what John Shepard noted from the 2015 Java One conference sessions he attended.
Supposedly Scala requires a completely different programming style. But what happens when you just want a Spring application? Is it possible to program in Scala without jumping in the deep end? Chariot’s John Shepard illustrates the difference in approach in this quick tutorial.
Java 8 is a substantial improvement over Java 7. Here are Java developer John Shepard’s top five favorite features.