Java 11 adds a few new methods to the String class – isBlank, lines, strip, stripLeading, stripTrailing, and repeat. Let’s see how we can make use of the String.lines().Read more “How to convert a string into a stream of lines using String.lines() method in Java 11”
Most of the developer’s idea is null checks makes the code less understandable and less reliable. Tony Hoare, who invented null references, calls them “a billion-dollar mistake”.Read more “How to avoid NullPointerException in Java”
Recently, Java changed its release cycle more rapidly. JDK 13 released on September 2019 and JDK 14 is scheduled for a production release on 17 March 2020. The features targeted to JDK 14 as follows,
1. Pattern Matching for instanceof
Java instanceof operator is used to test whether the object is an instance of the specified type. With Java 14 instanceof operator enhance to the pattern matching as bellow,
Java Development Kit (JDK) 13, the latest version of standard Java, is now available and release with some new features of,
1. Switch Expressions
This is one of the preveiew language feature defined in java 13.
Java 13 extends the previous Java 12 Switch Expressions by adding a new yield keyword to return a value from switch expression.So breaks syntax is no longer compiled in Java 13, it uses yield instead.
This is another preview language feature defined in java 13. Java 13 extends the previous Java 12 Switch expressions by adding a new yield keyword to return a value from switch expression. So break syntax is no longer compiled in Java 13, it uses yield.
As traditional switch statement, there are many break statements make it unnecessarily verbose and hard to debug errors.
A preview feature or VM feature is a new feature of the Java SE Platform.
This article shows you how to use –enable-preview to enable the preview features in Java 13 with maven.
To use preview features in your programs, you must explicitly enable them in the compiler and the runtime system. Because this feature disabled by default.If not, you’ll receive an error message that states that your code is using a preview feature.
I wanted to test the neo4j database access using a data source defined in Wildfly server. I used Wildfly 10.1.0 release. I wanted to use the driver with bolt protocol to observe the performance when using it. Read more “How to create a neo4j BoltDriver Datasource and connect it with a web app”
HOW TO UPLOAD FILES AND EXTRACT OTHER DATA FROM A POST SUBMISSION IN A SERVLET
In working with java EE, the submission of data from a JSP or a Servlet is basically handled by Struts or Spring frameworks. But for programmers, who may have an interest in the things in a POST Request, will find some use in this. Especially, if you intend to build a separate framework for any web application.
How To Make A Slider With RMI Server
First of all, let’s take a look at the RMI structure.
RMI is can be used to run a server and to connect several clients to the given server. It can be loosely coupled with the design patterns to optimise scalability.