Category: Tutorial

Java System Properties Sample Code

The Java System class comes with some very useful methods when it comes to System Properties. The Java platform uses a Properties object to maintain its own configuration. The Properties object describes the configuration of the current working environment.

Java String Replace Sample Code

The Java String class has three replace methods to manipulate a string. We have replace(), replaceAll(), and replaceFirst() methods to accomplish the replace of characters or strings within a string. The String.replace(arg1, arg2) method will return a new string

Java ArrayList Sample Code

The Java ArrayList collection class is a good option when you need to store a collection of data. The collections class can store just about anything, but it’s best to stay consistent. If you declare an ArrayList to hold

Java WatchService Sample Code

As a Java developer, I like to know when something changes with the configuration file, for example, that my Java application read at startup. Now what happens if you modify a parameter in the config file after startup? Nothing