I've got a class here, that only contains static
methods, so I call it a helper class, an example:
public class FileUtils {
public static String readFileEntry(final Path path, final String entryKey) throws IOException { }
public static String readAndModifyFileEntry(final Path path, final String entryKey, final UnaryOperator<String> operator) throws IOException { }
}
How should I declare the class (abstract
, final
, static
, etc.), such that it is not possible to instantiate the class? As you are not supposed to do so.
If that is not possible, then what is the best practice?
I'm using Java 8 if that is of any extra help.