Learn to parse and read XML file using Java StAX parser. StAX (Streaming API for XML) provides two ways to parse XML i.e. cursor based API and iterator based API. 1) StAX Parser Just like SAX parser, StAX API is designed for parsing XML streams. The difference is: StAX is a “pull” API. SAX is …
Category: Articles
Optional.isEmpty() Available in JDK 11 EA Builds
My recently posted question “Optional.isEmpty() Coming to Java?” was prompted by a core-li…
Payara Server Rolling Upgrades
To achieve continuous deployment applications must be deployed early and often. This, in turn, triggers downtime. Rolling upgrades solve this problem in an efficient way!
How to Invoke an External REST API from a Cloud Function
In a previous blog post I showed how to create your first cloud function (plus a video). It’s very l…
Java Convert XML to Properties – Read Properties from XML File – HowToDoInJava
Java example to create .properties file from XML file. This code can be used to read properties key-values from XML file, to be used in the application code. Properties to XML Example To convert XML file into properties file, best way is to use java.util.Properties class. Process is : Load XML file into java.util.Properties class …
Vaadin Flow – a marvelous deer
As you probably know, Vaadin is one of the most popular web frameworks on Java:https://zerotur…
Creating your first servlet
In this tutorial, we will learn how to create very basic web application with Servlet.Servlet is…
[FREE EBOOK] Lessons from analyzing over 600,000 Java projects
What does it take to build an informed error handling workflow?Investigating and resolving a…
Top 5 Selenium Webdriver with Java Courses for Testers and Developers to Learn Online
The days of manual testing is limited as more and more companies are shifting towards automation testing. This means all manual testing QAs…
Java 9 Jshell Tutorial
1. IntroductionIn this article we will learn about Java 9 Jshell. The Java Shell tool (JShell) is …
3 Pitfalls Everyone Should Avoid with Hybrid Multicloud (Part 4)
The daily cloud hype is all around you, yet there are three pitfalls everyone should avoid. From clo…
Effective Java in Kotlin, obsolete items thanks to Kotlin (items 3, 4, 16, 40, 61 from 3rd edition)
Kotlin is a huge improvement over Java. It has been designed when main Java flaws had been already known, so it could solve many of them…
Remove embedded null check with ‘Optional’ in Java 8
I replaced the following code:if (status.getPlace() == null) { row.set(“CountryCode”, “Unknown”); row.set(“Country”, “Unknown”);} else { if (status.getPlace().getCountryCode() == nul…
Java Array Clone – array.clone() – Shallow Copy – HowToDoInJava
Learn to create clone of an array in Java with example. Clone creates shallow copy of an array. Also learn to create array deep copies. Array Clone – Shallow Copy In Java, to create clone of array, you should use clone() method of array. It creates a shallow copy of array. Cloning always creates shallow …
Java Array Deep Copy Example – HowToDoInJava
Learn to create deep copy of an array in Java with example. We will be using Apache Commons Lang library and it’s utility class org.apache.commons.lang3.SerializationUtils to array deep copy. Array Deep Copy Example A deep copy of an array will have all objects and it’s referred objects – created fresh. References from old array will …