-
How to count the depth of xml document (DOM example)
To get the depth of a XML, just loop the node recursively, and compare the level, that’s all.Here is a DOM parser example to count and show the deepest level of an XML file.
Date: 2019-08-18 View: 1520
-
Java : Return a random item from a List
Normally, we are using the following ways to generate a random number in Java.
Date: 2019-08-17 View: 1520
-
Java Generate random integers in a range
In this article, we will show you three ways to generate random integers in a range.
Date: 2019-08-17 View: 1520
-
Java How to generate a random String
Few Java examples to show you how to generate a random alphanumeric String, with a fixed length.
Date: 2019-08-11 View: 1520
-
Java password generator example
A Java example to generate a strong, secure random password containing [a-zA-Z0-9!@#$%&*()_+-=[]?] characters, with a length of 15.
Date: 2019-08-11 View: 1520
-
Java How to lock a file before writing
In Java, we can combine RandomAccessFile and FileChannel to lock a file before writing.
Date: 2019-08-11 View: 1520