Author: Seymour

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 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

Java Create File Sample Code

Creating a file in Java is pretty simple using the createNewFile() method of the Java File class. The code sample below will create a an empty file called SampleFileOut.txt in the specified folder. The sampleFileOut String contains the path