article thumbnail

Mangling JSON numbers

TechEmpower

In the remainder of this article, we examine potential improvements to our handling of long. Theoretically we can send it from a Java server to a JavaScript client via JSON and both sides see exactly the same number. x.toString() is similar in spirit to x.toExponential() and Double.toString(double) from Java. Failing fast.

article thumbnail

EnumSet and EnumMap

TechEmpower

This article discusses java.util.EnumSet. from Java's standard libraries. Historically, Enum{Set,Map} were recommended as a matter of safety, taking better advantage of Java's type system than the alternatives. Effective Java goes into detail about this use case for Enum{Set,Map} and enum types in general. What are they?

Java 330