unexpected String.join() behavior Languages

unexpected String.join() behavior

I tried to print contents of a List<String> with a "," in between them. Followed the book Functional Programming in Java by Venkat Subramaniam, on page 54 , he did exactly what I am doing but my print result is coming as a single string without a comma(,).
Read More
How should I design this program? Languages

How should I design this program?

I am writing a program in Java. The picture is self-explanatory - The main method spawns three threads. The SAX processor processes the input XML file, generates JAXB objects and puts them in guava cache. Guava cache is handled by another thread. Whenever any object comes into the cache, this...
Read More
multiple null checks in Java8 Languages

multiple null checks in Java8

I have the below code which is bit ugly for multiple null checks.So I tried using Optional.ofNullable like below, but its still difficult to understand if someone reads my code. what is the best approach to do that in Java 8.
Read More